From 28351b6494fa2832e0e8b62643929c307b808f2b Mon Sep 17 00:00:00 2001 From: Le Dien Phuc Date: Wed, 5 Jun 2024 15:03:45 +0700 Subject: [PATCH] fix: parse average cost onchain asset (#1688) --- src/commands/balances/index/processor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/balances/index/processor.ts b/src/commands/balances/index/processor.ts index b11d779e3..233660bd7 100644 --- a/src/commands/balances/index/processor.ts +++ b/src/commands/balances/index/processor.ts @@ -640,7 +640,7 @@ async function switchView( if (balanceType === BalanceType.Onchain && props.address != "") { const { data: avg } = await mochiApi.getOnchainAverageCost(props.address) avg?.forEach((d: { symbol: string; average_cost: number }) => { - averageCosts[d.symbol] = formatUsdDigit(d.average_cost) + averageCosts[d.symbol] = d.average_cost.toString() }) }