Skip to content

Commit

Permalink
fix: max leverage display type (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Jan 24, 2025
1 parent b3f28f7 commit dc94239
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/MarketStatsDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { useAppSelector } from '@/state/appTypes';
import { getSelectedDisplayUnit } from '@/state/appUiConfigsSelectors';
import { getCurrentMarketMidMarketPrice } from '@/state/perpetualsSelectors';

import { BIG_NUMBERS, MustBigNumber } from '@/lib/numbers';
import { BIG_NUMBERS, MaybeBigNumber, MustBigNumber } from '@/lib/numbers';
import { orEmptyObj } from '@/lib/typeUtils';

import { MidMarketPrice } from './MidMarketPrice';
Expand Down Expand Up @@ -319,7 +319,10 @@ const DetailsItem = ({
? BIG_NUMBERS.ONE.div(effectiveInitialMarginFraction)
: null
}
withDiff={initialMarginFraction !== effectiveInitialMarginFraction}
withDiff={
MaybeBigNumber(initialMarginFraction)?.toNumber() !==
(effectiveInitialMarginFraction ?? undefined)
}
type={OutputType.Multiple}
/>
);
Expand Down

0 comments on commit dc94239

Please sign in to comment.