Skip to content

Commit

Permalink
devop: remove hw wallets from backups
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Feb 25, 2025
1 parent e38db30 commit f84d36c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packages/extension/src/libs/backup-state/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BrowserStorage from '../common/browser-storage';
import { InternalStorageNamespace } from '@/types/provider';
import {
BackupAccountType,
BackupData,
BackupResponseType,
BackupType,
Expand Down Expand Up @@ -187,7 +188,7 @@ class BackupState {
}
});
const getAccountByIndex = (
accounts: Omit<EnkryptAccount, 'address' | 'publicKey'>[],
accounts: BackupAccountType[],
basePath: string,
signerType: SignerType,
idx: number,
Expand Down Expand Up @@ -257,7 +258,7 @@ class BackupState {
const backupData: BackupData = {
accounts: allAccounts
.filter(
acc => !acc.isTestWallet && acc.walletType !== WalletType.privkey,
acc => !acc.isTestWallet && acc.walletType === WalletType.mnemonic,
)
.map(acc => {
return {
Expand All @@ -266,8 +267,6 @@ class BackupState {
name: acc.name,
signerType: acc.signerType,
walletType: acc.walletType,
isHardware: acc.isHardware,
HWOptions: acc.HWOptions,
};
}),
uuid: state.userId,
Expand Down
7 changes: 6 additions & 1 deletion packages/extension/src/libs/backup-state/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export interface BackupResponseType {
backup: BackupType;
}

export type BackupAccountType = Omit<
EnkryptAccount,
'address' | 'publicKey' | 'isHardware' | 'HWOptions'
>;

export interface BackupData {
accounts: Omit<EnkryptAccount, 'address' | 'publicKey'>[];
accounts: BackupAccountType[];
uuid: string;
}

0 comments on commit f84d36c

Please sign in to comment.