fix(web): trim whitespace on pasted recipient address input - #596
Conversation
Pasting an address with trailing whitespace caused validation failure. Now automatically trims the input before validation and storage. Closes Fundable-Protocol#439
|
@CHKM001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesRecipient address normalization
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR #439
Description
Pasting a Stellar address with trailing whitespace (e.g.,
GB...or\nGB...) into the recipient address input causes validation to fail becausevalidateStellarAddressreceives the un-trimmed string.This fix trims whitespace from the address value at the input handler level in
RecipientRow, so the pasted/typed value is sanitized before validation and state storage.Changes
apps/web/src/components/molecules/RecipientRow.tsx—handleAddressChangenow calls.trim()on the input value before passing it toonChange.Testing
use-distribution-state.test.ts,stellar-validation.test.ts, andamount-validation.test.tspass.GABC... \nno longer triggers a validation error; the whitespace is stripped.Closes #439
Summary by CodeRabbit