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
|
// must set transaction to submitted/failed before releasing lock
|
||||||
nonceLock.releaseLock()
|
nonceLock.releaseLock()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.setTxStatusFailed(txId, {
|
if(!err.message) err.message = 'Transaction failed during approval'
|
||||||
stack: err.stack || err.message,
|
this.setTxStatusFailed(txId, err)
|
||||||
errCode: err.errCode || err,
|
|
||||||
message: err.message || 'Transaction failed during approval',
|
|
||||||
})
|
|
||||||
// must set transaction to submitted/failed before releasing lock
|
// must set transaction to submitted/failed before releasing lock
|
||||||
if (nonceLock) nonceLock.releaseLock()
|
if (nonceLock) nonceLock.releaseLock()
|
||||||
// continue with error chain
|
// continue with error chain
|
||||||
|
Loading…
Reference in New Issue
Block a user