From 828734b977f7c26c249c81af73fc8eef0b66e416 Mon Sep 17 00:00:00 2001 From: frankiebee Date: Thu, 14 Dec 2017 18:15:38 -0800 Subject: transactions:gas-utils - handle new type of estimateGas error --- app/scripts/lib/tx-gas-utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/lib/tx-gas-utils.js b/app/scripts/lib/tx-gas-utils.js index 7e72ea71d..56bee19f7 100644 --- a/app/scripts/lib/tx-gas-utils.js +++ b/app/scripts/lib/tx-gas-utils.js @@ -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 } -- cgit v1.2.3