chore: use generated types from vega protos - fix after conflicts resolving

This commit is contained in:
maciek
2023-06-18 22:28:10 +02:00
parent bf718dfb87
commit 8ae9609022
3 changed files with 7 additions and 8 deletions
@@ -72,7 +72,6 @@ export const AccountBreakdownDialog = memo(
onClose: () => void;
onMarketClick?: (marketId: string, metaKey?: boolean) => void;
}) => {
console.log('render');
return (
<Dialog
size="medium"
@@ -23,8 +23,8 @@ const margins: MarginFieldsFragment = {
},
};
const getMargins = jest.fn(() => 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(<MarginHealthChart marketId="marketId" assetId="assetId" />);
});
@@ -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();