diff options
author | frankiebee <frankie.diamond@gmail.com> | 2018-06-26 06:07:54 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2018-06-26 06:07:54 +0800 |
commit | 9b92ba4c47d5489c5c0f822045360be708110cac (patch) | |
tree | f73fe1beed9cdc4dd4295a2d5a4579205a391dc4 /app/scripts/controllers | |
parent | 7d3da0ae96a761461ee12bf20d8386a5ba7aade2 (diff) | |
download | tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar.gz tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar.bz2 tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar.lz tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar.xz tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.tar.zst tangerine-wallet-browser-9b92ba4c47d5489c5c0f822045360be708110cac.zip |
trandsactions - remove rejected transactions from history
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r-- | app/scripts/controllers/transactions/tx-state-manager.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js index 0aae4774b..28a18ca2e 100644 --- a/app/scripts/controllers/transactions/tx-state-manager.js +++ b/app/scripts/controllers/transactions/tx-state-manager.js @@ -288,6 +288,7 @@ class TransactionStateManager extends EventEmitter { */ setTxStatusRejected (txId) { this._setTxStatus(txId, 'rejected') + this._removeTx(txId) } /** @@ -422,6 +423,11 @@ class TransactionStateManager extends EventEmitter { _saveTxList (transactions) { this.store.updateState({ transactions }) } + + _removeTx (txId) { + const transactionList = this.getFullTxList() + this._saveTxList(transactionList.filter((txMeta) => txMeta.id !== txId)) + } } module.exports = TransactionStateManager |