1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

tx controller - resubmit - correctly set error on bad nonce/balance

This commit is contained in:
kumavis 2017-07-07 19:13:06 -07:00
parent c53aac398a
commit c425ad4ec7

View File

@ -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)
}