Skip to content

Commit

Permalink
refactor(migration/105): use Omit
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharly committed Jan 20, 2025
1 parent 070d493 commit 0d3dfe4
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions app/scripts/migrations/105.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EthAccountType } from '@metamask/keyring-api';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import { sha256FromString } from 'ethereumjs-util';
import { v4 as uuid } from 'uuid';
import { cloneDeep } from 'lodash';
import { Json } from '@metamask/utils';
import { ETH_EOA_METHODS } from '../../../shared/constants/eth-methods';

type VersionedData = {
Expand All @@ -16,21 +16,9 @@ export type Identity = {
lastSelected?: number;
};

export type InternalAccountV1 = {
type: string;
id: string;
options: Record<string, Json>;
metadata: {
name: string;
importTime: number;
keyring: {
type: string;
};
lastSelected?: number;
};
address: string;
methods: string[];
};
// The `InternalAccount` has been updated with `@metamask/keyring-api@13.0.0`, so we
// omit the new field to re-use the original type for that migration.
export type InternalAccountV1 = Omit<InternalAccount, 'scopes'>;

export const version = 105;

Expand Down

0 comments on commit 0d3dfe4

Please sign in to comment.