bancorprotocol / webapp

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

error: "Failed to estimate gas" #1425

Closed ashachaf closed 3 years ago

ashachaf commented 3 years ago

Describe the bug when trying to swap tokens (tested swapping ETH->BNT), there is a console error indicating there was an error with calculating gas estimation for the transaction. in my case, the metamask transaction was opened correctly. we however get some reports of transactions with 1gwei gas settings.

image

To Reproduce Steps to reproduce the behavior:

  1. Go to swap
  2. Click on eth and bnt
  3. confirm the transaction on our site (in order to trigger the metamask window) open console log to see error
Velua commented 3 years ago

We try to estimate gas and apply a bit of a buffer to it ourselves but MetaMask doesn't always work, but even so will do a successful gas estimate when we finally hand over the transaction settings to MetaMask.

Never do we suggest what the price should be though, that's entirely on Web 3 so weird that's happening, what is the gas amount getting estimated?

ashachaf commented 3 years ago

the bug is only on console from the looks of it. as the metamask window is ok to sign.

Velua commented 3 years ago

Okay I've since removed the log as it's sometimes to be expected to failure and the code will expect that, given the nature of Web3.