mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
tx controller - resubmit - correctly set error on bad nonce/balance
This commit is contained in:
parent
c53aac398a
commit
c425ad4ec7
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user