mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
use error for #approveTransaction when setting failed
This commit is contained in:
parent
5ac4c2de6f
commit
b471afcdb3
@ -229,11 +229,8 @@ module.exports = class TransactionController extends EventEmitter {
|
||||
// must set transaction to submitted/failed before releasing lock
|
||||
nonceLock.releaseLock()
|
||||
} catch (err) {
|
||||
this.setTxStatusFailed(txId, {
|
||||
stack: err.stack || err.message,
|
||||
errCode: err.errCode || err,
|
||||
message: err.message || 'Transaction failed during approval',
|
||||
})
|
||||
if(!err.message) err.message = 'Transaction failed during approval'
|
||||
this.setTxStatusFailed(txId, err)
|
||||
// must set transaction to submitted/failed before releasing lock
|
||||
if (nonceLock) nonceLock.releaseLock()
|
||||
// continue with error chain
|
||||
|
Loading…
Reference in New Issue
Block a user