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

chore(cherry-pick):759b92e to 12.1.1 #26802

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions app/scripts/migrations/105.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function expectedInternalAccount(
type: 'HD Key Tree',
},
lastSelected: lastSelected ? expect.any(Number) : undefined,
importTime: 0,
},
options: {},
methods: ETH_EOA_METHODS,
Expand Down
1 change: 1 addition & 0 deletions app/scripts/migrations/105.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function createInternalAccountsForAccountsController(
metadata: {
name: identity.name,
lastSelected: identity.lastSelected ?? undefined,
importTime: 0,
Gudahtt marked this conversation as resolved.
Show resolved Hide resolved
keyring: {
// This is default HD Key Tree type because the keyring is encrypted
// during migration, the type will get updated when the during the
Expand Down
14 changes: 7 additions & 7 deletions app/scripts/migrations/119.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ function transformState(state: Record<string, any>) {
.accounts,
).length > 0
) {
Object.values(accountsController.internalAccounts.accounts).forEach(
(internalAccount: InternalAccount) => {
if (!internalAccount.metadata?.importTime) {
internalAccount.metadata.importTime = Date.now();
}
},
);
Object.values<InternalAccount>(
accountsController.internalAccounts.accounts,
).forEach((internalAccount) => {
if (!internalAccount.metadata?.importTime) {
internalAccount.metadata.importTime = Date.now();
}
});
}

return {
Expand Down
Loading