chore: use generated types from vega protos - fix after conflicts resolving
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user