diff options
passing tokens to all accounts in migration
Diffstat (limited to 'app')
-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}} } } |