Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokens per account & network basis #4884

Merged
merged 21 commits into from
Aug 7, 2018
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
passing tokens to all accounts in migration
  • Loading branch information
estebanmino committed Jul 30, 2018
commit 0757f47e84d601792e65c32286465b115ae6770c
9 changes: 6 additions & 3 deletions app/scripts/migrations/028.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
}
}

Expand Down