1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/app/scripts
Mark Stacey 52d25f0df8
Fix inflated gas estimates (#9984)
If a `gasPrice` was specified in a transaction sent via a dapp, we
would include it in our `eth_estimateGas` call, causing it to fail if
the user had insufficient balance (for either the transaction amount or
the gas fee). This resulted in the fallback gas estimate being used;
the block gas limit. The block gas limit is quite a bit larger than
most transactions need, so this resulted in wildly inflated gas costs
being shown on our confirmation screen.

The `gasPrice` has been removed from the `txParams` object we pass to
`eth_estimateGas`, so now it won't perform any balance checks anymore.
This ensures that we'll get a valid gas estimate, as long as geth is
able to simulate the contract execution properly.

Fixes #9967
2020-12-03 13:55:42 -03:30
..
account-import-strategies
controllers Fix inflated gas estimates (#9984) 2020-12-03 13:55:42 -03:30
lib add new MetaMetricsController (#9857) 2020-12-02 15:41:30 -06:00
migrations add new MetaMetricsController (#9857) 2020-12-02 15:41:30 -06:00
platforms
background.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00
chromereload.js
contentscript.js Make JSDoc formatting more consistent (#9796) 2020-11-10 14:00:41 -03:30
first-time-state.js
initSentry.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00
inpage.js Warn instead of throw on duplicate web3 and do not inject (#9832) 2020-11-09 10:40:40 -08:00
metamask-controller.js add new MetaMetricsController (#9857) 2020-12-02 15:41:30 -06:00
phishing-detect.js
runLockdown.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00
ui.js Add SES lockdown to extension webapp (#9729) 2020-11-24 11:26:43 +08:00