Skip to content

FIX: remove commas before format vault balance in usd#864

Merged
guimroque merged 1 commit intostagingfrom
p2/fix/vault-card-usd-balance-nan
Mar 13, 2026
Merged

FIX: remove commas before format vault balance in usd#864
guimroque merged 1 commit intostagingfrom
p2/fix/vault-card-usd-balance-nan

Conversation

@pedroanastacio
Copy link
Copy Markdown
Contributor

Description

If the vault balance in USD is in the thousands or higher, the balance is displayed as NaN on the vault card

Summary

  • Remove commas before format vault balance in USD

Checklist

  • I reviewed my PR code before submitting
  • I ensured that the implementation is working correctly and did not impact other parts of the app
  • I implemented error handling for all actions/requests and verified how they will be displayed in the UI (or there was no error handling needed).
  • I mentioned the PR link in the task

Comment thread src/modules/vault/components/VaultCard.tsx
Copy link
Copy Markdown
Member

@guimroque guimroque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Summary

The fix addresses a NaN display issue when formatting vault balances in USD with commas. The solution removes commas before parsing the number, which resolves the formatting problem. However, there are some implementation concerns around the utility function usage and formatting configuration.

Strengths

  • Good use of useMemo for performance optimization in formatting calculations
  • Proper null coalescing with fallback to '0' for undefined balances
  • Clean import organization following project standards

Issues

  • 1 important issue around potential utility function misuse

@aws-amplify-us-east-1
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-864.db1b4e2lqk8yl.amplifyapp.com

@guimroque guimroque merged commit 95a17a9 into staging Mar 13, 2026
2 of 3 checks passed
@guimroque guimroque deleted the p2/fix/vault-card-usd-balance-nan branch March 13, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants