1 import { WasmNetwork } from '@proton/andromeda';
3 import * as useBitcoinNetworkModule from '../../store/hooks/useBitcoinNetwork';
5 export const mockUseBitcoinNetwork = (
6 mockedValue?: Partial<ReturnType<typeof useBitcoinNetworkModule.useBitcoinNetwork>>
8 const spy = vi.spyOn(useBitcoinNetworkModule, 'useBitcoinNetwork');
10 spy.mockReturnValue([mockedValue?.[0] ?? WasmNetwork.Testnet, mockedValue?.[1] ?? false]);
15 export const mockUseGetBitcoinNetwork = (mockedValue?: WasmNetwork) => {
16 const spy = vi.spyOn(useBitcoinNetworkModule, 'useGetBitcoinNetwork');
18 spy.mockImplementation(() => async () => mockedValue ?? WasmNetwork.Testnet);