From dbcad5fcf33021fcdff034ae2f848342b19709bd Mon Sep 17 00:00:00 2001 From: dafuga Date: Mon, 28 Oct 2024 18:06:19 -0700 Subject: [PATCH] fix: fixing market cap calculation --- src/routes/[network]/(account)/ram/+page.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/[network]/(account)/ram/+page.svelte b/src/routes/[network]/(account)/ram/+page.svelte index 44a324e0..5252832f 100644 --- a/src/routes/[network]/(account)/ram/+page.svelte +++ b/src/routes/[network]/(account)/ram/+page.svelte @@ -21,11 +21,11 @@ let ramSupply: Asset | undefined = $state(); $effect(() => { + console.log({ ramState: JSON.parse(JSON.stringify(ramState, null, 2)) }); if (ramState) { const quoteBalanceEOS = ramState.quote.balance.value; - const connectorWeight = ramState.quote.weight.value; marketCapEOS = Asset.from( - quoteBalanceEOS / connectorWeight, + quoteBalanceEOS, data.network.chain.systemToken?.symbol || '0, UNKNOWN' ); ramSupply = Asset.from((ramState?.base.balance.value || 0) / (1000 * 1000 * 1000), '2,GB');