aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-07-30 23:41:31 +0800
committerEsteban MIno <efmino@uc.cl>2018-07-30 23:41:31 +0800
commit0757f47e84d601792e65c32286465b115ae6770c (patch)
tree9aecb5630aca6d8a0047502bc906a35f10b9ca2f /app
parentdd6a725e6d76b5910d1d23a5e36905b6057e54fd (diff)
downloadtangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.gz
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.bz2
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.lz
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.xz
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.zst
tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.zip
passing tokens to all accounts in migration
Diffstat (limited to 'app')
-rw-r--r--app/scripts/migrations/028.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/scripts/migrations/028.js b/app/scripts/migrations/028.js
index cbda48584..6553a1052 100644
--- a/app/scripts/migrations/028.js
+++ b/app/scripts/migrations/028.js
@@ -26,10 +26,13 @@ function transformState (state) {
if (newState.PreferencesController) {
if (newState.PreferencesController.tokens) {
- const tokens = newState.TransactionController.tokens
- const selectedAddress = newState.PreferencesController.selectedAddress
+ const identities = newState.TransactionController.identities
+ const tokens = newState.PreferencesController.tokens
+ newState.PreferencesController.accountTokens = {}
+ for (const identity in identities) {
+ newState.PreferencesController.accountTokens[identity] = {'mainnet': tokens}
+ }
newState.PreferencesController.tokens = []
- newState.PreferencesController.accountTokens = {[selectedAddress]: {'mainnet': tokens}}
}
}