mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
passing tokens to all accounts in migration
This commit is contained in:
parent
dd6a725e6d
commit
0757f47e84
@ -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}}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user