From e3c906de04b3a3498bca29719373f5cdbae6fb8b Mon Sep 17 00:00:00 2001 From: 0xgnek <0xgnek@gmail.com> Date: Sat, 13 Apr 2024 15:39:59 +0000 Subject: [PATCH] fix pika --- dexs/pika-protocol/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dexs/pika-protocol/index.ts b/dexs/pika-protocol/index.ts index 670c1f9279..51cc6f48c1 100644 --- a/dexs/pika-protocol/index.ts +++ b/dexs/pika-protocol/index.ts @@ -45,8 +45,8 @@ const fetch = (chain: Chain) => { `; const res: IValume = (await request(endpoints[chain], graphQuery)); - const dailyVolume = Number(res.vaultDayData.cumulativeVolume) / 10 ** 8; - const totalVolume = Number(res.vaults[0].cumulativeVolume) / 10 ** 8; + const dailyVolume = Number(res.vaultDayData?.cumulativeVolume || 0) / 10 ** 8; + const totalVolume = Number(res.vaults[0]?.cumulativeVolume || 0) / 10 ** 8; return { timestamp,