Skip to content

Commit

Permalink
[Dashboard] Fix: AA Testnet Transaction Count (#5958)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfromstl authored Jan 15, 2025
1 parent 51a28c4 commit 07a5c98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ export function SponsoredTransactionsChartCard(props: {
if (!chartData) {
_chartDataMap.set(stat.date, {
time: format(new Date(stat.date), "MMM dd"),
[chain?.name || chainId || "Unknown"]:
Math.round(stat.sponsoredUsd * 100) / 100,
[chain?.name || chainId || "Unknown"]: stat.successful,
} as ChartData);
} else {
chartData[chain?.name || chainId || "Unknown"] =
(chartData[chain?.name || chainId || "Unknown"] || 0) +
Math.round(stat.sponsoredUsd * 100) / 100;
stat.successful;
}

chainIdToVolumeMap.set(
chain?.name || chainId || "Unknown",
stat.sponsoredUsd + (chainIdToVolumeMap.get(chainId || "Unknown") || 0),
stat.successful +
(chainIdToVolumeMap.get(chain?.name || chainId || "Unknown") || 0),
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ export function TotalSponsoredChartCard(props: {
if (!chartData) {
_chartDataMap.set(stat.date, {
time: format(new Date(stat.date), "MMM dd"),
[chain?.name || chainId || "Unknown"]:
Math.round(stat.sponsoredUsd * 100) / 100,
[chain?.name || chainId || "Unknown"]: stat.sponsoredUsd,
} as ChartData);
} else {
chartData[chain?.name || chainId || "Unknown"] =
(chartData[chain?.name || chainId || "Unknown"] || 0) +
Math.round(stat.sponsoredUsd * 100) / 100;
stat.sponsoredUsd;
}

chainIdToVolumeMap.set(
Expand Down

0 comments on commit 07a5c98

Please sign in to comment.