aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-07-31 07:09:17 +0800
committerEsteban MIno <efmino@uc.cl>2018-07-31 07:09:17 +0800
commitfbcba8f019313c3b02429043578e044046c6cc68 (patch)
tree08e0e28d3824a709363074cdff7b74580b6e1207 /app
parent31286673c3bd0c35925f2d41f3e24c0a9d561fa8 (diff)
downloadtangerine-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.js6
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 })
}