From f84d44dbf90e941e2426463296bca26bfdc9232b Mon Sep 17 00:00:00 2001 From: LukasDeco Date: Mon, 10 Jun 2024 20:27:38 +0100 Subject: [PATCH] rm: utc conversion for prices_chart_data --- lib/client/indexer/markets.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/client/indexer/markets.ts b/lib/client/indexer/markets.ts index 6df79bc..cdd49ad 100644 --- a/lib/client/indexer/markets.ts +++ b/lib/client/indexer/markets.ts @@ -24,14 +24,12 @@ import { orders_bool_exp, orders_order_by, orders_select_column, - prices_chart_data_bool_exp, - proposal_prices_chart_data_bool_exp + prices_chart_data_bool_exp } from "./__generated__"; import { Client as GQLWebSocketClient } from "graphql-ws"; import { FutarchyMarketsRPCClient } from "../rpc/markets"; import { PriceMath } from "@metadaoproject/futarchy"; import { BN } from "@coral-xyz/anchor"; -import { convertUTCToLocalDate } from "@/dates"; export class FutarchyIndexerMarketsClient implements FutarchyMarketsClient { public openbook: FutarchyIndexerOpenbookMarketsClient; @@ -380,9 +378,7 @@ export class FutarchyIndexerMarketsClient implements FutarchyMarketsClient { const spotObservations = data.data?.prices_chart_data?.map((d) => ({ priceUi: d.price, - // prices_chart_data.interv is stored as a timestamp without timezone - // so we convert to the client's local alignment with other date columns in the indexer - createdAt: convertUTCToLocalDate(new Date(d.interv)), + createdAt: new Date(d.interv), quoteAmount: d.quote_amount, baseAmount: d.base_amount }));