Skip to content

Commit

Permalink
chore(cherry-pick):759b92e to 12.1.1 (#26802)
Browse files Browse the repository at this point in the history
  • Loading branch information
montelaidev authored Aug 30, 2024
1 parent 1a5a9c0 commit 0ef30b9
Show file tree
Hide file tree
Showing 16 changed files with 1,063 additions and 135 deletions.
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,
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

0 comments on commit 0ef30b9

Please sign in to comment.