diff options
author | Esteban MIno <efmino@uc.cl> | 2018-07-31 07:09:17 +0800 |
---|---|---|
committer | Esteban MIno <efmino@uc.cl> | 2018-07-31 07:09:17 +0800 |
commit | fbcba8f019313c3b02429043578e044046c6cc68 (patch) | |
tree | 08e0e28d3824a709363074cdff7b74580b6e1207 /app | |
parent | 31286673c3bd0c35925f2d41f3e24c0a9d561fa8 (diff) | |
download | tangerine-wallet-browser-fbcba8f019313c3b02429043578e044046c6cc68.tar.gz tangerine-wallet-browser-fbcba8f019313c3b02429043578e044046c6cc68.tar.zst tangerine-wallet-browser-fbcba8f019313c3b02429043578e044046c6cc68.zip |
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 }) } |