diff --git a/libs/accounts/src/lib/accounts-manager.tsx b/libs/accounts/src/lib/accounts-manager.tsx index 437a08a3d..1caf44f32 100644 --- a/libs/accounts/src/lib/accounts-manager.tsx +++ b/libs/accounts/src/lib/accounts-manager.tsx @@ -72,7 +72,6 @@ export const AccountBreakdownDialog = memo( onClose: () => void; onMarketClick?: (marketId: string, metaKey?: boolean) => void; }) => { - console.log('render'); return ( margins); -const getBalance = jest.fn(() => '0'); +const mockGetMargins = jest.fn(() => margins); +const mockGetBalance = jest.fn(() => '0'); jest.mock('./margin-data-provider', () => ({})); @@ -49,7 +49,7 @@ jest.mock('@vegaprotocol/wallet', () => ({ jest.mock('@vegaprotocol/data-provider', () => ({ useDataProvider: () => { return { - data: getMargins(), + data: mockGetMargins(), }; }, })); @@ -57,7 +57,7 @@ jest.mock('@vegaprotocol/data-provider', () => ({ jest.mock('./use-account-balance', () => ({ useAccountBalance: () => { return { - accountBalance: getBalance(), + accountBalance: mockGetBalance(), }; }, })); @@ -88,7 +88,7 @@ describe('MarginHealthChart', () => { }); it('should use correct scale', async () => { - getBalance.mockReturnValueOnce('1300'); + mockGetBalance.mockReturnValueOnce('1300'); await act(async () => { render(); }); diff --git a/libs/deal-ticket/src/hooks/use-estimate-fees.tsx b/libs/deal-ticket/src/hooks/use-estimate-fees.tsx index 9ad2b0b5a..ae8b350ae 100644 --- a/libs/deal-ticket/src/hooks/use-estimate-fees.tsx +++ b/libs/deal-ticket/src/hooks/use-estimate-fees.tsx @@ -1,10 +1,10 @@ import { useVegaWallet } from '@vegaprotocol/wallet'; -import type { OrderSubmissionBody } from '@vegaprotocol/wallet'; +import type { DealTicketOrderSubmission } from '@vegaprotocol/wallet'; import { useEstimateFeesQuery } from './__generated__/EstimateOrder'; export const useEstimateFees = ( - order?: OrderSubmissionBody['orderSubmission'] + order?: DealTicketOrderSubmission ) => { const { pubKey } = useVegaWallet();