fix(trading): ensure fees queries always fetch on mount and poll (#5566)
This commit is contained in:
parent
78f5a9c520
commit
c8067669c2
@ -38,7 +38,11 @@ export const FeesContainer = () => {
|
|||||||
const { data: markets, loading: marketsLoading } = useMarketList();
|
const { data: markets, loading: marketsLoading } = useMarketList();
|
||||||
|
|
||||||
const { data: programData, loading: programLoading } =
|
const { data: programData, loading: programLoading } =
|
||||||
useDiscountProgramsQuery({ errorPolicy: 'ignore' });
|
useDiscountProgramsQuery({
|
||||||
|
errorPolicy: 'ignore',
|
||||||
|
fetchPolicy: 'cache-and-network',
|
||||||
|
pollInterval: 15000,
|
||||||
|
});
|
||||||
|
|
||||||
const volumeDiscountWindowLength =
|
const volumeDiscountWindowLength =
|
||||||
programData?.currentVolumeDiscountProgram?.windowLength || 1;
|
programData?.currentVolumeDiscountProgram?.windowLength || 1;
|
||||||
@ -49,6 +53,8 @@ export const FeesContainer = () => {
|
|||||||
partyId: pubKey || '',
|
partyId: pubKey || '',
|
||||||
},
|
},
|
||||||
skip: !pubKey,
|
skip: !pubKey,
|
||||||
|
fetchPolicy: 'cache-and-network',
|
||||||
|
pollInterval: 15000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const previousEpoch = (Number(feesData?.epoch.id) || 0) - 1;
|
const previousEpoch = (Number(feesData?.epoch.id) || 0) - 1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import type { DiscountProgramsQuery, FeesQuery } from './__generated__/Fees';
|
import type { DiscountProgramsQuery, FeesQuery } from './__generated__/Fees';
|
||||||
|
|
||||||
export const useReferralStats = (
|
export const useReferralStats = (
|
||||||
previousEpoch?: number,
|
previousEpoch?: number,
|
||||||
referralStats?: NonNullable<
|
referralStats?: NonNullable<
|
||||||
|
Loading…
Reference in New Issue
Block a user