aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-05-18 00:05:38 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-05-18 00:05:38 +0800
commit67310e151ea75c7aa4fc00bfd63bf41cd4f2db51 (patch)
tree244a582ed826747cf48d8aad9a4a3f3a18991b66 /app
parente546f4b9041c03deb74ed115b8bcfe3869670b6e (diff)
downloadtangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar.gz
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar.bz2
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar.lz
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar.xz
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.tar.zst
tangerine-wallet-browser-67310e151ea75c7aa4fc00bfd63bf41cd4f2db51.zip
Fix migration 026 to produce the correct shape for state.identities
Diffstat (limited to 'app')
-rw-r--r--app/scripts/migrations/026.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/scripts/migrations/026.js b/app/scripts/migrations/026.js
index ef0ed0542..1b8a91a45 100644
--- a/app/scripts/migrations/026.js
+++ b/app/scripts/migrations/026.js
@@ -34,7 +34,14 @@ function transformState (state) {
return state
}
- state.PreferencesController.identities = state.KeyringController.walletNicknames
+ state.PreferencesController.identities = Object.keys(state.KeyringController.walletNicknames)
+ .reduce((identities, address) => {
+ identities[address] = {
+ name: state.KeyringController.walletNicknames[address],
+ address,
+ }
+ return identities
+ }, {})
delete state.KeyringController.walletNicknames
return state
}