bancorprotocol / webapp

Bancor Swap/Analytics webapp
https://app.bancor.network
MIT License
32 stars 45 forks source link

wETH->ETH flow errors #1482

Closed ashachaf closed 3 years ago

ashachaf commented 3 years ago

Describe the bug going thru the flow of unwrapping, i've encountered several issues.

  1. selecting a specific percentage to unwrap triggers incorrect amount in the transaction
    • selecting 25% -> trigger with 50%
    • selecting 99% -> trigger with 50%
    • selecting 100% -> trigger with 0 amount
  2. create a transaction and reject it on metamask -> when trying to create a new transaction it kept showing me the "transaction rejected" popup. only after site refresh i was able to create a new transaction
  3. for some reason, there is no "notification" for this transaction
  4. transaction was pending for some time on the blockchain, which lead to the site to show "transaction failed" popup while it is still pending on the blockchain

image

Velua commented 3 years ago

transaction was pending for some time on the blockchain, which lead to the site to show "transaction failed" popup while it is still pending on the blockchain

This error is created by design so the user isn't stuck forever. Should we expand it to 200 blocks? @ashachaf

Velua commented 3 years ago

@pingustar I've created a PR in attempt to fix the 25% => 50% issue, let me know if you think that's fixed it. The following is the remaining to tackle

  • create a transaction and reject it on metamask -> when trying to create a new transaction it kept showing me the "transaction rejected" popup. only after site refresh i was able to create a new transaction
  • for some reason, there is no "notification" for this transaction
pingustar commented 3 years ago

@Velua I have added the modal fix. But I think we need to increase default gas estimate. Getting this error too:

image

Velua commented 3 years ago

Gas estimate doesn't impact the speed of which a transaction gets processed, just the gas price. Did you get a tx hash from it? And so you waited for around 100 blocks before this error happened then?

pingustar commented 3 years ago

Gas estimate doesn't impact the speed of which a transaction gets processed, just the gas price. Did you get a tx hash from it? And so you waited for around 100 blocks before this error happened then?

yeah, Confirmed within 1 hr:13 mins:58 secs https://etherscan.io/tx/0x469c3fadfb8cda3e555142d946c40169bdfbad7fc21654a545664d50cdb2db7d

ahh and I think another thing we should change is the Withdraw WETH action to resolve immediately.

Velua commented 3 years ago

That whole block your TX is in is weird... most transactions appear to have been waiting for that long and sharing similar gas prices... strange.

ahh and I think another thing we should change is the Withdraw WETH action to resolve immediately

What do you think of this idea @ashachaf ?

ashachaf commented 3 years ago

transaction was pending for some time on the blockchain, which lead to the site to show "transaction failed" popup while it is still pending on the blockchain

This error is created by design so the user isn't stuck forever. Should we expand it to 200 blocks? @ashachaf

are we able to use any "notification" service for this? for example, alchemy and onboard has this in their service.

Velua commented 3 years ago

The notification service won't offer us any additional benefit than what we've already got access too.

Either we can make the user wait for confirmation or make it resolve immediately like some other transactions then have the popup come up on confirmation.