Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiquet committed Jan 12, 2024
1 parent 1bce02d commit c8064c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions components/markets/MarketHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ const MarketHeader: FC<{
const [showMarketHistory, setShowMarketHistory] = useState(false);
const starts = Number(period.start);
const ends = Number(period.end);
const volume = new Decimal(pool?.volume ?? neoPool?.volume ?? 0)
.div(ZTG)
.toNumber();
const volume = new Decimal(market.volume).div(ZTG).toNumber();

const { outcome, by } = getMarketStatusDetails(
marketType,
Expand Down
6 changes: 2 additions & 4 deletions lib/gql/markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ const marketQuery = gql`
marketId
description
baseAsset
volume
pool {
poolId
createdAt
volume
baseAsset
}
neoPool {
createdAt
collateral
volume
}
question
slug
Expand Down Expand Up @@ -90,6 +89,7 @@ export interface MarketPageIndexedData {
question: string;
description: string | PortableTextBlock[];
status: MarketStatus;
volume: string;
period: {
block: string[];
start: string;
Expand All @@ -105,14 +105,12 @@ export interface MarketPageIndexedData {
resolvedOutcome: string;
pool?: {
poolId: number;
volume: string;
createdAt: string;
baseAsset: string;
};
neoPool?: {
collateral: string;
createdAt: string;
volume: string;
};
scalarType: ScalarRangeType;
marketType: {
Expand Down

0 comments on commit c8064c4

Please sign in to comment.