diff options
author | Dan <danjm.com@gmail.com> | 2017-12-21 06:46:12 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2017-12-21 06:46:12 +0800 |
commit | 7915e62d65de1bbc3419cba58f69e6d55a4df3ea (patch) | |
tree | b1b9c006bac35381619eccde235d66e0a4c0bf1f /app/scripts/lib/tx-state-manager.js | |
parent | bccbf14b39ab2b1670c9c30b276404fe4f949cd7 (diff) | |
parent | d3f5ad874e4bf90cda4e440f9b0635c6ac416382 (diff) | |
download | tangerine-wallet-browser-7915e62d65de1bbc3419cba58f69e6d55a4df3ea.tar.gz tangerine-wallet-browser-7915e62d65de1bbc3419cba58f69e6d55a4df3ea.tar.zst tangerine-wallet-browser-7915e62d65de1bbc3419cba58f69e6d55a4df3ea.zip |
Merge branch 'master' into NewUI-flat
Diffstat (limited to 'app/scripts/lib/tx-state-manager.js')
-rw-r--r-- | app/scripts/lib/tx-state-manager.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js index 0fd6bed4b..a8ef39891 100644 --- a/app/scripts/lib/tx-state-manager.js +++ b/app/scripts/lib/tx-state-manager.js @@ -187,6 +187,10 @@ module.exports = class TransactionStateManger extends EventEmitter { this._setTxStatus(txId, 'rejected') } + // should update the status of the tx to 'unapproved'. + setTxStatusUnapproved (txId) { + this._setTxStatus(txId, 'unapproved') + } // should update the status of the tx to 'approved'. setTxStatusApproved (txId) { this._setTxStatus(txId, 'approved') @@ -236,7 +240,7 @@ module.exports = class TransactionStateManger extends EventEmitter { txMeta.status = status this.emit(`${txMeta.id}:${status}`, txId) this.emit(`tx:status-update`, txId, status) - if (status === 'submitted' || status === 'rejected') { + if (['submitted', 'rejected', 'failed'].includes(status)) { this.emit(`${txMeta.id}:finished`, txMeta) } this.updateTx(txMeta, `txStateManager: setting status to ${status}`) |