aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers
diff options
context:
space:
mode:
authorEsteban MiƱo <efmino@uc.cl>2018-07-28 04:07:08 +0800
committerGitHub <noreply@github.com>2018-07-28 04:07:08 +0800
commit228f48c6e5423cbf8cfd5d48a3f6f106448cc22e (patch)
tree19a1aa5a5d8ebe349c4807d247f6e317d2ea0852 /app/scripts/controllers
parent5b9725d1f154e8ed0994c3aab844f696937b0e6e (diff)
parent1540b5e256634dbbbc01627ca45afe82329d39a9 (diff)
downloadtangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar.gz
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar.bz2
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar.lz
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar.xz
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.tar.zst
tangerine-wallet-browser-228f48c6e5423cbf8cfd5d48a3f6f106448cc22e.zip
Merge branch 'develop' into TokensPerAccountBasis
Diffstat (limited to 'app/scripts/controllers')
-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 ab4031faa..5cd0f5407 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