Skip to content

fix(send): trigger validation on Max so Review enables immediately#2100

Merged
MusabShakeel576 merged 1 commit into
qafrom
claude/send-max-validate-GDDOC-qa
May 26, 2026
Merged

fix(send): trigger validation on Max so Review enables immediately#2100
MusabShakeel576 merged 1 commit into
qafrom
claude/send-max-validate-GDDOC-qa

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of #2099 onto qa.

On the Send modal, clicking Max without typing first leaves the Review button disabled. handleMaxPress calls setValue('amount', maxAmount), but RHF's onChange mode only re-runs the Zod schema when the Controller's TextInput fires its own onChange — programmatic setValue doesn't re-validate, so isValid stays false and the Review button reads disabled={!selectedToken || !isValid}.

Call trigger('amount') after setValue — the same pattern CardRepayForm and Unstake/RegularWithdrawForm already use for the identical case.

Test plan

  • Open Send → pick a recipient → pick a token with non-zero balance
  • Without typing in the amount field, click Max → Review becomes enabled
  • Type a custom amount after Max → Review still tracks validity correctly

https://claude.ai/code/session_013ovmPbLFvPhUCQq9qggyes


Generated by Claude Code

The form uses react-hook-form's onChange mode, which only re-runs the
Zod schema when the Controller's TextInput fires onChange. handleMaxPress
just calls setValue('amount', maxAmount), which writes the value but
doesn't run validation, so isValid stays at its prior value (false if
the user hadn't typed first) and the Review button remains disabled.

Call trigger('amount') after setValue — matches the pattern already
used in CardRepayForm and RegularWithdrawForm for the same problem.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 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 26, 2026 2:15pm
solid-app-staging Ignored Ignored May 26, 2026 2:15pm

Request Review

@MusabShakeel576 MusabShakeel576 merged commit f21a5bd into qa May 26, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/send-max-validate-GDDOC-qa branch May 26, 2026 14:24
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