Merge branch 'renovate/all-minor-patch' into 'main'
[ProtonMail-WebClient.git] / packages / wallet / tests / mocks / useWalletSettings.ts
blob99cc1d0257ff5600f6360cf43b30a9b459ac6519
1 import * as useWalletSettingsModule from '../../store/hooks/useWalletSettings';
3 export const mockUseWalletSettings = (
4     mockedValue?: Partial<ReturnType<typeof useWalletSettingsModule.useWalletSettings>>
5 ) => {
6     const spy = vi.spyOn(useWalletSettingsModule, 'useWalletSettings');
8     spy.mockReturnValue([
9         {
10             ...mockedValue?.[0],
11             BitcoinUnit: 'BTC',
12             FiatCurrency: 'USD',
13             HideEmptyUsedAddresses: 0,
14             TwoFactorAmountThreshold: 0,
15             ReceiveEmailIntegrationNotification: null,
16             ReceiveInviterNotification: null,
17             WalletCreated: null,
18             AcceptTermsAndConditions: 0,
19             ReceiveTransactionNotification: null,
20         },
21         mockedValue?.[1] ?? false,
22     ]);
24     return spy;