Description
`components/analytics/charts.tsx:67,87` hardcodes `formatTokenAmount(token.amount, 7)` instead of using the token's actual decimals. The `TokenShare` type doesn't even carry a `decimals` field, so any custom token with a decimals value other than 7 (XLM's decimals) displays the wrong amount in the analytics chart.
Location
`components/analytics/charts.tsx:67, 87`
Task
Add a `decimals` field to the `TokenShare` type, populate it from the token metadata where `TokenShare` objects are constructed, and use that value instead of the hardcoded `7` in both chart call sites.
Good for newcomers because
Clear, well-scoped data-correctness bug affecting a specific, easy-to-verify display (chart amounts for non-XLM tokens).
Description
`components/analytics/charts.tsx:67,87` hardcodes `formatTokenAmount(token.amount, 7)` instead of using the token's actual decimals. The `TokenShare` type doesn't even carry a `decimals` field, so any custom token with a decimals value other than 7 (XLM's decimals) displays the wrong amount in the analytics chart.
Location
`components/analytics/charts.tsx:67, 87`
Task
Add a `decimals` field to the `TokenShare` type, populate it from the token metadata where `TokenShare` objects are constructed, and use that value instead of the hardcoded `7` in both chart call sites.
Good for newcomers because
Clear, well-scoped data-correctness bug affecting a specific, easy-to-verify display (chart amounts for non-XLM tokens).