mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
transactions:gas-utils - handle new type of estimateGas error
This commit is contained in:
parent
115c5e3a43
commit
828734b977
@ -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