diff options
author | Esteban MIno <efmino@uc.cl> | 2018-07-30 23:41:31 +0800 |
---|---|---|
committer | Esteban MIno <efmino@uc.cl> | 2018-07-30 23:41:31 +0800 |
commit | 0757f47e84d601792e65c32286465b115ae6770c (patch) | |
tree | 9aecb5630aca6d8a0047502bc906a35f10b9ca2f | |
parent | dd6a725e6d76b5910d1d23a5e36905b6057e54fd (diff) | |
download | tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.gz tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.tar.zst tangerine-wallet-browser-0757f47e84d601792e65c32286465b115ae6770c.zip |
passing tokens to all accounts in migration
-rw-r--r-- | app/scripts/migrations/028.js | 9 |
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}} } } |