Itheum / data-dex

DApp with suite of web3 tools to trade personal data on MultiversX
https://datadex.itheum.io
GNU General Public License v3.0
466 stars 6 forks source link

Data NFT Marketplace: There has to be handling/messaging of concurrent actions failure while Data NFT is being procured. #602

Closed fuzzyduke closed 1 year ago

fuzzyduke commented 1 year ago

Description:

Users have provided feedback of issue that arise from NFT being already Procured.

These include

  1. 2 Users attempt to procure the same NFT. https://devnet-explorer.multiversx.com/transactions/f499b76b1690f8e0e5b345c40a64b0bfdb27e7bafe93bd0ea9a68073fbca7584
  2. Updating price of an NFT while it is being procured throws error.
  3. Delisting of an NFT while it is being procured throws error.

The users only is able to view useful information of the failure if they browse to the explorer instance of the transaction.

BogdanCostinas commented 1 year ago

Description: Some community testers faced some issues with understanding the messages on the explorer after they received an error inside the Data DEX after performing actions like Delist/Update price. Some of the errors were due to the fact that the NFTs were already procured by others and there was not enough quantity to be updated.

Suggestion: Add a specific message AND/OR even a pop-up message when somebody procures your Data NFT

fuzzyduke commented 1 year ago

Updating price scenario

https://devnet-explorer.multiversx.com/transactions/a33d616155efa2ed57d25dc0863139b9980997b5595b9a121976c8bcb20a3c2b

damienen commented 1 year ago

The only way to do this is to manually check via API when the TX goes and match TXs between them for each transaction the user sends.

I feel like this is way too much overhead. Moreover, treating this case in this way is not implemented on any marketplace (probably exactly because of this problem)

I suggest we do not fix this. @newbreedofgeek what do you think?

damienen commented 1 year ago

We could capture the SC error message and provide some clues on why the TX failed

"Offer not found" "Wrong token amount" "Quantity too high"

These should be mapped and shown a modal informing the user why their transaction might have failed (the offer was updated while they were trying to buy)

icegriffinguru commented 1 year ago

Initial version pushed. Detect failure of "Purchase", "De-List", "Update Price" transactions and show a toast with error message from SC. Only in marketplace.

fuzzyduke commented 1 year ago

Verified. Fixed. 3 scenarios verified; procure, update price, delisting

image

image

image