diff options
create tokens storage when setadresses
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/preferences.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 4daa196a9..5c158288b 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -87,8 +87,10 @@ class PreferencesController { ids[address] = {name: `Account ${index + 1}`, address, ...oldId} return ids }, {}) - const accountTokens = addresses.reduce((address) => { - return oldAccountTokens[address] || {} + const accountTokens = addresses.reduce((tokens, address) => { + const oldTokens = oldAccountTokens[address] || {} + tokens[address] = oldTokens + return tokens }, {}) this.store.updateState({ identities, accountTokens }) } |