mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #2751 from MetaMask/i#2720
transactions:gas-utils - handle new type of estimateGas error
This commit is contained in:
commit
84dece92a6
@ -22,7 +22,11 @@ module.exports = class txProvideUtil {
|
||||
try {
|
||||
estimatedGasHex = await this.estimateTxGas(txMeta, block.gasLimit)
|
||||
} catch (err) {
|
||||
if (err.message.includes('Transaction execution error.')) {
|
||||
const simulationFailed = (
|
||||
err.message.includes('Transaction execution error.') ||
|
||||
err.message.includes('gas required exceeds allowance or always failing transaction')
|
||||
)
|
||||
if ( simulationFailed ) {
|
||||
txMeta.simulationFails = true
|
||||
return txMeta
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user