From c425ad4ec71c6a5d5cc7af3d2a4d42c56c3ca125 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 7 Jul 2017 19:13:06 -0700 Subject: tx controller - resubmit - correctly set error on bad nonce/balance --- app/scripts/controllers/transactions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') 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) } -- cgit v1.2.3