Skip to content

[TASK-16692] Fix: TokenAmountInput having 0.00 default value#1422

Merged
Hugo0 merged 1 commit intopeanut-wallet-devfrom
fix/default-input-value
Nov 7, 2025
Merged

[TASK-16692] Fix: TokenAmountInput having 0.00 default value#1422
Hugo0 merged 1 commit intopeanut-wallet-devfrom
fix/default-input-value

Conversation

@Zishan-7
Copy link
Contributor

@Zishan-7 Zishan-7 commented Nov 7, 2025

image

@notion-workspace
Copy link

@vercel
Copy link

vercel bot commented Nov 7, 2025

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

Project Deployment Preview Comments Updated (UTC)
peanut-wallet Building Building Preview Comment Nov 7, 2025 5:05pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

An early return condition was added to an effect in the TokenAmountInput component that prevents formatting and onChange updates when tokenValue is empty or falsy, altering the control flow for syncing token and USD values.

Changes

Cohort / File(s) Summary
TokenAmountInput effect control flow
src/components/Global/TokenAmountInput/index.tsx
Added early return in effect to skip formatting and onChange propagation when tokenValue is falsy

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that skipping onChange when tokenValue is empty is the intended behavior and doesn't cause downstream issues with state synchronization
  • Confirm existing tests cover this early-return condition
  • Check if this change affects form validation or submission logic that depends on onChange callbacks

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • jjramirezn
  • Hugo0
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/default-input-value

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 837315b and 827ed0c.

📒 Files selected for processing (1)
  • src/components/Global/TokenAmountInput/index.tsx (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Hugo0 Hugo0 merged commit dd1cd6a into peanut-wallet-dev Nov 7, 2025
3 of 5 checks passed
@coderabbitai coderabbitai bot added the enhancement New feature or request label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants