diff --git a/contexts/RefetchContext.tsx b/contexts/RefetchContext.tsx index dd8f674896..0195d95865 100644 --- a/contexts/RefetchContext.tsx +++ b/contexts/RefetchContext.tsx @@ -9,6 +9,7 @@ import useGetFuturesOpenOrders from 'queries/futures/useGetFuturesOpenOrders'; import useGetFuturesPositionForMarket from 'queries/futures/useGetFuturesPositionForMarket'; import useGetFuturesPositionForMarkets from 'queries/futures/useGetFuturesPositionForMarkets'; import useGetFuturesPotentialTradeDetails from 'queries/futures/useGetFuturesPotentialTradeDetails'; +import useQueryCrossMarginAccount from 'queries/futures/useQueryCrossMarginAccount'; import useExchangeRatesQuery from 'queries/rates/useExchangeRatesQuery'; import useLaggedDailyPrice from 'queries/rates/useLaggedDailyPrice'; import useSynthBalances from 'queries/synths/useSynthBalances'; @@ -42,6 +43,7 @@ export const RefetchProvider: React.FC = ({ children }) => { useGetFuturesPotentialTradeDetails(); useGetAverageFundingRateForMarkets(PERIOD_IN_SECONDS[Period.ONE_HOUR]); useLaggedDailyPrice(); + useQueryCrossMarginAccount(); const handleRefetch = (refetchType: RefetchType, timeout?: number) => { setTimeout(() => { diff --git a/sections/futures/MarketDetails/MarketDetails.tsx b/sections/futures/MarketDetails/MarketDetails.tsx index a147d14aee..e2e6f15a37 100644 --- a/sections/futures/MarketDetails/MarketDetails.tsx +++ b/sections/futures/MarketDetails/MarketDetails.tsx @@ -13,8 +13,6 @@ import { formatCurrency, formatPercent } from 'utils/formatters/number'; import useGetMarketData from './useGetMarketData'; -type MarketData = Record; - type MarketDetailsProps = { mobile?: boolean; }; @@ -27,7 +25,7 @@ const MarketDetails: React.FC = ({ mobile }) => { const pausedClass = marketInfo?.isSuspended ? 'paused' : ''; - const data: MarketData = useGetMarketData(mobile); + const data = useGetMarketData(mobile); const lastOracleUpdateTimeQuery = useRateUpdateQuery({ baseCurrencyKey: marketAsset, diff --git a/sections/shared/Layout/AppLayout/Header/BalanceActions.tsx b/sections/shared/Layout/AppLayout/Header/BalanceActions.tsx index b531305a9f..4de2c41b09 100644 --- a/sections/shared/Layout/AppLayout/Header/BalanceActions.tsx +++ b/sections/shared/Layout/AppLayout/Header/BalanceActions.tsx @@ -9,7 +9,6 @@ import Button from 'components/Button'; import CurrencyIcon from 'components/Currency/CurrencyIcon'; import Select from 'components/Select'; import { Synths } from 'constants/currency'; -import useQueryCrossMarginAccount from 'queries/futures/useQueryCrossMarginAccount'; import { balancesState, positionsState } from 'store/futures'; import { FlexDivRow, FlexDivRowCentered } from 'styles/common'; import { formatCurrency, zeroBN } from 'utils/formatters/number'; @@ -28,8 +27,6 @@ const BalanceActions: FC = () => { const theme = useTheme(); const router = useRouter(); - useQueryCrossMarginAccount(); - const synthBalances = useRecoilValue(balancesState); const futuresPositions = useRecoilValue(positionsState);