22import { includes , without , get } from 'lodash' ;
33import { toJS } from '../../../../common/utils/helper' ;
44import { electronStoreConversation } from '../../ipc/electronStoreConversation' ;
5+ import type { WalletMigrationStatus } from '../../stores/WalletMigrationStore' ;
56import { WalletMigrationStatuses } from '../../stores/WalletMigrationStore' ;
67import {
78 STORAGE_TYPES as types ,
89 STORAGE_KEYS as keys ,
910} from '../../../../common/config/electron-store.config' ;
1011import type { NewsTimestamp } from '../news/types' ;
11- import type { WalletMigrationStatus } from '../../stores/WalletMigrationStore' ;
1212import type {
1313 TransportDevice ,
1414 HardwareWalletExtendedPublicKeyResponse ,
15- DeviceType ,
1615} from '../../../../common/types/hardware-wallets.types' ;
1716import type { StorageKey } from '../../../../common/types/electron-store.types' ;
1817import type { Currency , DeprecatedCurrency } from '../../types/currencyTypes' ;
1918import {
2019 CURRENCY_IS_ACTIVE_BY_DEFAULT ,
2120 CURRENCY_DEFAULT_SELECTED ,
2221} from '../../config/currencyConfig' ;
22+ import {
23+ AssetLocalData ,
24+ HardwareWalletDevicesType ,
25+ HardwareWalletLocalData ,
26+ HardwareWalletsLocalData ,
27+ UnpairedHardwareWalletData ,
28+ WalletLocalData ,
29+ } from '../../types/localDataTypes' ;
2330
24- export type WalletLocalData = {
25- id : string ;
26- recoveryPhraseVerificationDate ?: Date | null | undefined ;
27- creationDate : Date ;
28- showUsedAddresses : boolean ;
29- } ;
30- export type WalletsLocalData = Record < StorageKey , WalletLocalData > ;
3131export type SetHardwareWalletLocalDataRequestType = {
3232 walletId : string ;
3333 data : {
@@ -42,27 +42,6 @@ export type SetHardwareWalletDeviceRequestType = {
4242 data : UnpairedHardwareWalletData ;
4343} ;
4444
45- export type UnpairedHardwareWalletData = {
46- deviceType ?: DeviceType ;
47- deviceModel ?: string ;
48- deviceName ?: string ;
49- path ?: string | null | undefined ;
50- paired ?: string | null | undefined ;
51- disconnected ?: boolean ;
52- } ;
53-
54- export type HardwareWalletLocalData = {
55- id : string ;
56- deviceType : DeviceType ;
57- device : TransportDevice ;
58- extendedPublicKey : HardwareWalletExtendedPublicKeyResponse ;
59- disconnected : boolean ;
60- } ;
61- export type HardwareWalletsLocalData = Record < string , HardwareWalletLocalData > ;
62- export type HardwareWalletDevicesType = Record < string , TransportDevice > ;
63- export type AssetLocalData = {
64- decimals : number ;
65- } ;
6645/**
6746 * This api layer provides access to the electron local storage
6847 * for user settings that are not synced with any coin backend.
0 commit comments