mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
revert unnecessary change in state manager
This commit is contained in:
parent
9026651224
commit
349fb9e0bc
@ -399,19 +399,13 @@ class TransactionStateManager extends EventEmitter {
|
|||||||
_setTxStatus (txId, status) {
|
_setTxStatus (txId, status) {
|
||||||
const txMeta = this.getTx(txId)
|
const txMeta = this.getTx(txId)
|
||||||
txMeta.status = status
|
txMeta.status = status
|
||||||
setTimeout(() => {
|
this.emit(`${txMeta.id}:${status}`, txId)
|
||||||
try {
|
this.emit(`tx:status-update`, txId, status)
|
||||||
this.updateTx(txMeta, `txStateManager: setting status to ${status}`)
|
if (['submitted', 'rejected', 'failed'].includes(status)) {
|
||||||
this.emit(`${txMeta.id}:${status}`, txId)
|
this.emit(`${txMeta.id}:finished`, txMeta)
|
||||||
this.emit(`tx:status-update`, txId, status)
|
}
|
||||||
if (['submitted', 'rejected', 'failed'].includes(status)) {
|
this.updateTx(txMeta, `txStateManager: setting status to ${status}`)
|
||||||
this.emit(`${txMeta.id}:finished`, txMeta)
|
this.emit('update:badge')
|
||||||
}
|
|
||||||
this.emit('update:badge')
|
|
||||||
} catch (error) {
|
|
||||||
log.error(error)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user