diff options
author | Csaba Solya <csaba.solya@gmail.com> | 2018-05-10 19:33:40 +0800 |
---|---|---|
committer | Csaba Solya <csaba.solya@gmail.com> | 2018-05-10 19:33:40 +0800 |
commit | 349fb9e0bcf873de4f63db2bc7a3452043223fde (patch) | |
tree | beb60d81a688a60bd532884bf066fbb2c7b9865a /app/scripts/controllers/transactions | |
parent | 9026651224f03069d3ab80cef5fe1386f9d7a532 (diff) | |
download | tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar.gz tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar.bz2 tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar.lz tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar.xz tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.tar.zst tangerine-wallet-browser-349fb9e0bcf873de4f63db2bc7a3452043223fde.zip |
revert unnecessary change in state manager
Diffstat (limited to 'app/scripts/controllers/transactions')
-rw-r--r-- | app/scripts/controllers/transactions/tx-state-manager.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js index 0aae4774b..33bb855c5 100644 --- a/app/scripts/controllers/transactions/tx-state-manager.js +++ b/app/scripts/controllers/transactions/tx-state-manager.js @@ -399,19 +399,13 @@ class TransactionStateManager extends EventEmitter { _setTxStatus (txId, status) { const txMeta = this.getTx(txId) txMeta.status = status - setTimeout(() => { - try { - 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.emit('update:badge') - } catch (error) { - log.error(error) - } - }) + 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') } /** |