aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorBruno Barbieri <brunobar79@gmail.com>2018-01-31 17:25:32 +0800
committerBruno Barbieri <brunobar79@gmail.com>2018-01-31 17:25:32 +0800
commit03d17c75ae47806e9afa562cf664819b83a2b926 (patch)
tree7d308e31370a89096fc019c205dca48ee6fb76d7 /app/scripts/lib
parent5f39844382fb3106b883efb81f55a6e909f28b01 (diff)
downloadtangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar.gz
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar.bz2
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar.lz
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar.xz
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.tar.zst
tangerine-wallet-browser-03d17c75ae47806e9afa562cf664819b83a2b926.zip
wipe only transactions for current account
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/tx-state-manager.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js
index 6b4a196f2..13e645a28 100644
--- a/app/scripts/lib/tx-state-manager.js
+++ b/app/scripts/lib/tx-state-manager.js
@@ -221,10 +221,16 @@ module.exports = class TransactionStateManger extends EventEmitter {
this._setTxStatus(txId, 'failed')
}
- wipeTransactions () {
- this._saveTxList([]);
+ wipeTransactions (address) {
+ // network only tx
+ const txs = this.getTxList()
+
+ // Filter out the ones from the current account
+ const otherAccountTxs = txs.filter((txMeta) => txMeta.from !== address)
+
+ // Update state
+ this._saveTxList(otherAccountTxs)
}
-
//
// PRIVATE METHODS
//