extension icon indicating copy to clipboard operation
extension copied to clipboard

Sending ETH doesn't work

Open mhluongo opened this issue 2 years ago • 5 comments

Screenshot from 2022-08-23 14-06-17

Sending ETH often returns to the asset page rather than the sign page. This behavior appears to depend on the recipient address... making me suspect #1900

mhluongo avatar Aug 23 '22 18:08 mhluongo

Would you mind pasting an address here that you've seen send fail for?

0xDaedalus avatar Aug 23 '22 18:08 0xDaedalus

Yep! I was using 0x85eee30c52b0b379b046fb0f85f4f3dc3009afec, the KEEP token address. Note this was on main prior to the merge of #1993

mhluongo avatar Aug 23 '22 18:08 mhluongo

No luck on a quick fix but one thing that is happening is we're getting {code: -32000, message: "execution reverted"} back from alchemy when calling eth_estimateGas with the tx

0xDaedalus avatar Aug 23 '22 20:08 0xDaedalus

Could this be related to contracts that have their receive function set to revert transactions or lack a receive function? Sending ETH to BNB 0xB8c77482e45F1F44dE1745F52C74426C631bDD52 works 🤔

hyphenized avatar Aug 24 '22 23:08 hyphenized

Yes - I do think that could be the case here.

My Go is a bit rusty - but here's what I think is going on:

When GETH tries to estimate gas - it simulates the transaction - and eventually returns an error if the all attempts at executing the transaction fail.

0xDaedalus avatar Aug 24 '22 23:08 0xDaedalus

The payable / fallback idea is definitely it @hyphenized. The right behavior here is to show that the tx has failed though, even if it's not accepted into the mempool... particularly if I signed it first.

mhluongo avatar Aug 25 '22 15:08 mhluongo

Can we check if the contract has a receive function and otherwise send users to the contract interaction screen?

hyphenized avatar Aug 27 '22 05:08 hyphenized

Gas estimation reverts deserve their own admonition for the user, fwiw.

Do you see a snackbar indicating the tx failed?

Shadowfiend avatar Aug 27 '22 15:08 Shadowfiend