aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-02-09 06:16:58 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-02-09 08:43:31 +0800
commiteb919f4710b37d09c9a3a68ed4c719e487cce9d9 (patch)
tree30e0c843a692ac10c637467b525f9bef0c795f48 /app/scripts/lib
parent2fd9e58e612e9fe341c9107a677238a566e3c1b8 (diff)
parentf39222c9afd9dcab4c6234940eb9a9cb06dbc6f0 (diff)
downloadtangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.gz
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.bz2
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.lz
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.xz
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.tar.zst
tangerine-wallet-browser-eb919f4710b37d09c9a3a68ed4c719e487cce9d9.zip
Merge branch 'uat-next' of https://github.com/MetaMask/metamask-extension into cb-254
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/config-manager.js11
-rw-r--r--app/scripts/lib/tx-state-manager.js11
2 files changed, 22 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index 9c0dffe9c..34b603b96 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -42,6 +42,17 @@ ConfigManager.prototype.getData = function () {
return this.store.getState()
}
+ConfigManager.prototype.setPasswordForgotten = function (passwordForgottenState) {
+ const data = this.getData()
+ data.forgottenPassword = passwordForgottenState
+ this.setData(data)
+}
+
+ConfigManager.prototype.getPasswordForgotten = function (passwordForgottenState) {
+ const data = this.getData()
+ return data.forgottenPassword
+}
+
ConfigManager.prototype.setWallet = function (wallet) {
var data = this.getData()
data.wallet = wallet
diff --git a/app/scripts/lib/tx-state-manager.js b/app/scripts/lib/tx-state-manager.js
index a8ef39891..051efd247 100644
--- a/app/scripts/lib/tx-state-manager.js
+++ b/app/scripts/lib/tx-state-manager.js
@@ -221,6 +221,17 @@ module.exports = class TransactionStateManger extends EventEmitter {
this._setTxStatus(txId, 'failed')
}
+ wipeTransactions (address) {
+ // network only tx
+ const txs = this.getFullTxList()
+ const network = this.getNetwork()
+
+ // Filter out the ones from the current account and network
+ const otherAccountTxs = txs.filter((txMeta) => !(txMeta.txParams.from === address && txMeta.metamaskNetworkId === network))
+
+ // Update state
+ this._saveTxList(otherAccountTxs)
+ }
//
// PRIVATE METHODS
//