aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/transactions
diff options
context:
space:
mode:
authorThomas Huang <thomas.b.huang@gmail.com>2018-08-02 01:40:31 +0800
committerThomas Huang <thomas.b.huang@gmail.com>2018-08-02 01:40:31 +0800
commit024ebe07e0c61e7185e84499a2f19885ac52e4a9 (patch)
tree88ed997d61c225573b7d75c357f5c11b6840a3ea /app/scripts/controllers/transactions
parent5b3927fe5b5243a89e5fd31ad069da9ea5c987e9 (diff)
parent4f02726fd9a2b7509dfd00eb4b23d9fc81eb5dcd (diff)
downloadtangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.gz
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.bz2
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.lz
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.xz
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.zst
tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.zip
Merge branch 'develop' into network-remove-provider-engine-tests
Diffstat (limited to 'app/scripts/controllers/transactions')
-rw-r--r--app/scripts/controllers/transactions/tx-gas-utils.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js
index 9bf2ae1e2..3dd45507f 100644
--- a/app/scripts/controllers/transactions/tx-gas-utils.js
+++ b/app/scripts/controllers/transactions/tx-gas-utils.js
@@ -30,14 +30,10 @@ class TxGasUtil {
try {
estimatedGasHex = await this.estimateTxGas(txMeta, block.gasLimit)
} catch (err) {
- 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
+ txMeta.simulationFails = {
+ reason: err.message,
}
+ return txMeta
}
this.setTxGas(txMeta, block.gasLimit, estimatedGasHex)
return txMeta