Commit 958a916
committed
backend/eth: return ErrInsufficientFunds if gas estimation failed
Similar to 7a25ac8.
EtherScan returns this error during when estimating the gas if there
are not enough funds to pay for the transaction.
This is likely a change in behavior in Etherscan, as the check below
`// Check that the entered value and the estimated fee are not greater
than the balance.` used to work. We keep that code in case we move
away from Etherscan or Etherscan changes the behavior and returns a
gas anyway.
This is not a robust check as it compares strings, but it is the best
we can do for now.1 parent 2799e57 commit 958a916
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
514 | 515 | | |
515 | 516 | | |
516 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
| |||
0 commit comments