aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-08 10:13:06 +0800
committerkumavis <aaron@kumavis.me>2017-07-08 10:13:06 +0800
commitc425ad4ec71c6a5d5cc7af3d2a4d42c56c3ca125 (patch)
tree34b83ebb0a3bbd28244bf7dcd870378168a40102 /app
parentc53aac398a29ff7cfe0efa6c844653693d78157b (diff)
downloadtangerine-wallet-browser-c425ad4ec71c6a5d5cc7af3d2a4d42c56c3ca125.tar.gz
tangerine-wallet-browser-c425ad4ec71c6a5d5cc7af3d2a4d42c56c3ca125.tar.zst
tangerine-wallet-browser-c425ad4ec71c6a5d5cc7af3d2a4d42c56c3ca125.zip
tx controller - resubmit - correctly set error on bad nonce/balance
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/transactions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index e1eaba232..18bb245de 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -453,7 +453,7 @@ module.exports = class TransactionController extends EventEmitter {
// if the value of the transaction is greater then the balance, fail.
if (gtBalance) {
const message = 'Insufficient balance.'
- this.setTxStatusFailed(txMeta.id, message)
+ this.setTxStatusFailed(txMeta.id, { message })
cb()
return log.error(message)
}
@@ -461,7 +461,7 @@ module.exports = class TransactionController extends EventEmitter {
// if the nonce of the transaction is lower then the accounts nonce, fail.
if (txNonce < nonce) {
const message = 'Invalid nonce.'
- this.setTxStatusFailed(txMeta.id, message)
+ this.setTxStatusFailed(txMeta.id, { message })
cb()
return log.error(message)
}