aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-07-06 14:23:57 +0800
committerDan Finlay <dan@danfinlay.com>2017-07-06 14:24:33 +0800
commit07d4e4fe6f31d99a9f15c3862671c5c07831ff2a (patch)
treeb358084dd6a442b86a79c7740d16a53679292687 /app
parent96df7ad8d36b68e521e670d28e3efda38e41972f (diff)
downloadtangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar.gz
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar.bz2
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar.lz
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar.xz
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.tar.zst
tangerine-wallet-browser-07d4e4fe6f31d99a9f15c3862671c5c07831ff2a.zip
Fix failing test
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/transactions.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 3f5834756..7946d10d1 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -430,24 +430,18 @@ module.exports = class TransactionController extends EventEmitter {
// if the value of the transaction is greater then the balance, fail.
if (gtBalance) {
- txMeta.err = {
- isWarning: true,
- message: 'Insufficient balance.',
- }
- this.updateTx(txMeta)
+ const message = 'Insufficient balance.'
+ this.setTxStatusFailed(txMeta.id, message)
cb()
- return log.error(txMeta.err.message)
+ return log.error(message)
}
// if the nonce of the transaction is lower then the accounts nonce, fail.
if (txNonce < nonce) {
- txMeta.err = {
- isWarning: true,
- message: 'Invalid nonce.',
- }
- this.updateTx(txMeta)
+ const message = 'Invalid nonce.'
+ this.setTxStatusFailed(txMeta.id, message)
cb()
- return log.error(txMeta.err.message)
+ return log.error(message)
}
// Only auto-submit already-signed txs: