Skip to content

Commit

Permalink
Merge pull request #1297 from Kwenta/dev
Browse files Browse the repository at this point in the history
fix mobile position card
  • Loading branch information
platschi authored Aug 18, 2022
2 parents f5f16e0 + d39759e commit 43bdedb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions contexts/RefetchContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(() => {
Expand Down
4 changes: 1 addition & 3 deletions sections/futures/MarketDetails/MarketDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import { formatCurrency, formatPercent } from 'utils/formatters/number';

import useGetMarketData from './useGetMarketData';

type MarketData = Record<string, { value: string | JSX.Element; color?: string }>;

type MarketDetailsProps = {
mobile?: boolean;
};
Expand All @@ -27,7 +25,7 @@ const MarketDetails: React.FC<MarketDetailsProps> = ({ mobile }) => {

const pausedClass = marketInfo?.isSuspended ? 'paused' : '';

const data: MarketData = useGetMarketData(mobile);
const data = useGetMarketData(mobile);

const lastOracleUpdateTimeQuery = useRateUpdateQuery({
baseCurrencyKey: marketAsset,
Expand Down
3 changes: 0 additions & 3 deletions sections/shared/Layout/AppLayout/Header/BalanceActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -28,8 +27,6 @@ const BalanceActions: FC = () => {
const theme = useTheme();
const router = useRouter();

useQueryCrossMarginAccount();

const synthBalances = useRecoilValue(balancesState);
const futuresPositions = useRecoilValue(positionsState);

Expand Down

1 comment on commit 43bdedb

@vercel
Copy link

@vercel vercel bot commented on 43bdedb Aug 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kwenta – ./

v2.beta.kwenta.io
kwenta.io
kwenta-kwenta.vercel.app
kwenta-git-main-kwenta.vercel.app

Please sign in to comment.