particl / particl-desktop

The GUI application for Particl Markeplace and PART coin wallet. A decentralized peer to peer marketplace –free, secure, private, untraceable.

Home Page:https://particl.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug when a buyer cancels the order and seller locks the order's escrow simultaniously

bacoinin opened this issue · comments

Describe the bug
When the seller locks the funds in the escrow and the buyer cancels the order at the same time, the seller's order modal updates to Packaging and the buyers modal changes to Canceled but still receives the seller escrow note and the escrow transaction id (displayed on the order modal).

Until the point where the seller ships the product i.e. Packaging->Shipping the buyer can see their canceled order in the Cancelled orders but after the order status updates the buyer can not see their "Canceled order" anywhere. It simply vanished from the orders.

Note that the funds are locked in an escrow and the buyer would need to manually unlock the escrow.

To Reproduce
Steps to reproduce the behavior:

  1. Open 2 PD clients with one acting as a seller and the other as a buyer
  2. Post a listing from the seller client and use the buyer client to send a buy request.
  3. Reach to the point where the seller has to lock the escrow contract. Simultaneously lock the funds in the escrow contract as a seller and cancel the order as a buyer
  4. See the above described error

Expected behavior
I have no idea but whatever happens should happen on both ends.

I would imagine that the seller locking the funds should supersede any cancel messages at this step even if there was a delay with the buyers node receiving the SMSG packet since the buyer had aggred. A simple solution would be the buyer's node to update the order modal from Cancelled to Packaging (it already updates the modal with the Escrow TX ID and seller's escrow message) and maybe include a note indicating that it was not possible to cancel the order as the seller already had locked the funds.

Screenshots
Available upon request

Versions (please complete the following information):

  • Particl Desktop: [v3.0 RC004]
  • Particl Core: [v0.19.2.12]

Additional context
Since I pressed as a seller "Shipped" my debug log keeps printing " debug: [api/services/observer/WaitingMessageService] getWaitingSmsgMessages(), found 1 messages."

Thanks for mentioning this... looking into it

An appropriate indication in the UI has been added to indicate to the buyer that despite cancelling, the seller has in fact, already completed the escrow.

The fix to ensure that the buyer node correctly updates is addressed with this change: xludx/particl-market#30

Closing: fixed for mainnet release of v3.0.0