soonaverse / app

The Soonaverse - Web3 platform for communities build on IOTA & Shimmer
https://soonaverse.com
Apache License 2.0
13 stars 10 forks source link

Open Checkout button does not bring back the checkout window #53

Closed emmap3-do closed 3 months ago

emmap3-do commented 1 year ago

Describe the bug When buying an NFT, if I accidentally close the checkout window, the "Open Checkout" blue button does not bring it back up (clicking on it does not seem to have any effect).

To Reproduce

  1. Go to any purchase page, eg. https://soonaverse.com/nft/0xaf4d7cee058c23314509806436c94c3da2026196
  2. Click on 'Buy now'
  3. Agree terms and conditions, then click on 'Confirm and lock' button
  4. Once order is created, click outside the popup checkout window so that it closes and bubble is shown top-right corner
  5. Click on 'Open checkout' button, it won't work.

Expected behavior 'Open checkout' button should open up the checkout popup window again so the user can complete the process.

Desktop (please complete the following information):

Additional context I wanted to replicate the bug locally, so I run the app from master branch. But I wasn't able to reproduce the bug!

emmap3-do commented 1 year ago

I've been looking at how it works, so far I found that when clicking on 'Confirm and Lock' button, it makes a request to api.build5.com/ordernft, which returns back some data to the browser including a 'uid'. Then, it stores this id in a local storage variable named 'App/checkoutTransaction'.

When you close the checkout popup, and click on 'Open Checkout' button, it is making a request to api.build5.com/api/getManyById provinding the uid from that local storage variable, in order to fetch nft details back to the UI.

At least this is how I think it works by running it locally.

Now, when I checked the same thing on the live website, I found that when it calls api.build5.com/api/getManyById upon clicking on 'Open Checkout' button, it is sending different uid value than the one stored in the local storage. So I guess this is the issue, it can't fetch the right data to open the checkout details up again.

On top of that, I found that on the live website there are multiple requests made to api.build5.com/api/getManyById, always sending different uids (never the one that matters).

github-actions[bot] commented 1 year ago

Stale issue, closing!