Skip to content

Commit

Permalink
fix: fixing market cap calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 29, 2024
1 parent cf2d830 commit dbcad5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/[network]/(account)/ram/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit dbcad5f

Please sign in to comment.