Skip to content

Commit

Permalink
fix: "Rewards claimed" stats for Shimmer (#1122)
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Panteleymonchuk <[email protected]>
  • Loading branch information
panteleymonchuk authored Feb 16, 2024
1 parent 7cbfb6d commit 43e9bed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/app/routes/stardust/landing/AnalyticStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const AnalyticStats: React.FC<AnalyticStatsProps> = ({ analytics, circulatingSup

let claimedAndPercentLabels: [string, string] | undefined;
if (analytics?.unclaimedShimmer && circulatingSupply) {
// magic number since influx doesn't account for the unclaimable portion of 20%
const shimmerClaimed = circulatingSupply - (Number.parseInt(analytics.unclaimedShimmer, 10) - 362724101812273);
claimedAndPercentLabels = buildShimmerClaimedStats(shimmerClaimed.toString(), String(circulatingSupply), tokenInfo);
const totalSupplyBigInt = (BigInt(circulatingSupply) * BigInt(100)) / BigInt(80); // https://github.com/iotaledger/explorer/issues/584
const shimmerClaimedBigInt = totalSupplyBigInt - BigInt(analytics.unclaimedShimmer);
claimedAndPercentLabels = buildShimmerClaimedStats(shimmerClaimedBigInt.toString(), totalSupplyBigInt.toString(), tokenInfo);
}

return analytics && !analytics.error ? (
Expand Down

0 comments on commit 43e9bed

Please sign in to comment.