ebtc-protocol / ebtc-bugs-and-issues

A place to report bugs and issues related to all ebtc products
0 stars 0 forks source link

Modal stuck in "processing" if txn is cancelled #4

Open albertocevallos opened 8 months ago

albertocevallos commented 8 months ago

Describe the bug Once you fill out the form (borrow amount, collateral ratio) and click on the "Borrow eBTC" action button, it opens up a model asking you to:

However, if you cancel the txn on Metamask, then the modal gets stuck in the "processing" state, you can't leave the screen because the modal is locked in place. Should be a simple fix that handles the Metamask/web3 callback with an error, updating the modal state.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://alpha.ebtc.finance/dapp/borrow
  2. Fill out the form
  3. Click on "Borrow eBTC"
  4. Metamask will be prompted asking you confirm the txn, click "cancel"

Expected behavior The modal component should handle the Metamask/web3 error and turn the modal state from "processing" back to "Approve" or "Confirm" button, not get stuck "Processing".

Screenshots

Screen Shot 2023-10-31 at 1 09 55 PM

Desktop (please complete the following information):

mrbasado commented 8 months ago

@albertocevallos Thank you for the report! Unfortunately our team can not reproduce this. Can you add a screenshot that includes your wallet? The only way we can do this is by leaving the transaction alone image

When approval or mint is cancelled, or approved -> transaction cancelled after we get a toast. Thank you for your time!