Skip to content

fix(card): show cashback to two decimals on details#2047

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/fix-cashback-display-nRYlP-master
May 5, 2026
Merged

fix(card): show cashback to two decimals on details#2047
MusabShakeel576 merged 1 commit into
masterfrom
claude/fix-cashback-display-nRYlP-master

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Cherry-pick of #2046 from qa to master.

Summary

  • Desktop SpendingBalanceCard was rounding totalUsdValue to whole dollars via .toFixed(0), so any cashback under $0.50 rendered as "$0".
  • Mobile CashbackDisplay used .toFixed(2) but then parseFloat'd the result, dropping trailing zeros (e.g. $0.30$0.3).
  • Both now produce a "$X.XX" string consistently.

Test plan

  • Card details (desktop): cashback amounts under $1 render with cents, e.g. $0.42 instead of $0.
  • Card details (mobile): cashback like $0.30 renders with the trailing zero, not $0.3.
  • When backend returns totalUsdValue: 0, both views render $0.00.

https://claude.ai/code/session_01KbGt2z23Ci4FWrvDcC8pEc


Generated by Claude Code

The desktop SpendingBalanceCard was rounding totalUsdValue to whole dollars
via .toFixed(0), so any cashback under $0.50 rendered as "$0". The mobile
CashbackDisplay used .toFixed(2) but then parseFloat-ed it back to a number,
dropping trailing zeros (e.g. "$0.30" rendered as "$0.3"). Format both as
"$X.XX" strings.

https://claude.ai/code/session_01KbGt2z23Ci4FWrvDcC8pEc
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored May 5, 2026 8:20am
solid-app-staging Ignored Ignored May 5, 2026 8:20am

Request Review

@MusabShakeel576 MusabShakeel576 merged commit 7a476e8 into master May 5, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/fix-cashback-display-nRYlP-master branch May 5, 2026 08:20
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