From 0757f47e84d601792e65c32286465b115ae6770c Mon Sep 17 00:00:00 2001 From: Esteban MIno Date: Mon, 30 Jul 2018 11:41:31 -0400 Subject: [PATCH] passing tokens to all accounts in migration --- app/scripts/migrations/028.js | 9 ++++++--- 1 file 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}} } }