Add state-labeled events to allow subscribing to any transaction's state change

feature/default_network_editable
Dan Finlay 7 years ago
parent 53a467cd1e
commit e4d7fb2447
  1. 1
      app/scripts/controllers/transactions.js

@ -434,6 +434,7 @@ module.exports = class TransactionController extends EventEmitter {
const txMeta = this.getTx(txId)
txMeta.status = status
this.emit(`${txMeta.id}:${status}`, txId)
this.emit(`${status}`, txId)
if (status === 'submitted' || status === 'rejected') {
this.emit(`${txMeta.id}:finished`, txMeta)
}

Loading…
Cancel
Save