Commit cd22bca
committed
[Dashboard] Fix: Exclude testnet $ from total sponsored (#5166)
<!-- start pr-codex -->
## PR-Codex overview
This PR focuses on improving the handling of analytics data in the `useUserOpUsageAggregate` function by incorporating chain data and refining the conditional rendering in the `stat.tsx` component.
### Detailed summary
- In `stat.tsx`, changed the conditional rendering to check for `value !== undefined` instead of `value &&`.
- In `useApi.ts`, imported `useAllChainsData` for accessing chain data.
- Added `chainStore` to hold all chains data.
- Modified `userOpStats` type to include `chainId`.
- Implemented a check to skip testnets in aggregated stats based on `chainId`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent e4b6d87 commit cd22bca
2 files changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
461 | 464 | | |
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
465 | 476 | | |
466 | 477 | | |
467 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments