|
|
|
@ -398,13 +398,15 @@ class TransactionStateManager extends EventEmitter { |
|
|
|
|
_setTxStatus (txId, status) { |
|
|
|
|
const txMeta = this.getTx(txId) |
|
|
|
|
txMeta.status = status |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.updateTx(txMeta, `txStateManager: setting status to ${status}`) |
|
|
|
|
this.emit(`${txMeta.id}:${status}`, txId) |
|
|
|
|
this.emit(`tx:status-update`, txId, status) |
|
|
|
|
if (['submitted', 'rejected', 'failed'].includes(status)) { |
|
|
|
|
this.emit(`${txMeta.id}:finished`, txMeta) |
|
|
|
|
} |
|
|
|
|
this.updateTx(txMeta, `txStateManager: setting status to ${status}`) |
|
|
|
|
this.emit('update:badge') |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|