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