feat: add inline Stellar address validation on destination fields - #39
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Validate destination addresses and gate sending apps/src/pages/SendPage.tsx |
SendPage tracks destination-address errors, validates each input value, displays an inline error, and disables sending when the address is invalid. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Possibly related issues
- Stellarflow issue 3 — Both changes update destination-address input handling in
SendPage.tsx; this pull request adds the validation and error-state behavior.
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Title check | The title describes a clipboard paste button, but the changes validate destination addresses and disable sending for invalid addresses. | Update the title to describe destination-address validation and the invalid-address send restriction. | |
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feat/address-validation
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 @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/src/pages/SendPage.tsx`:
- Around line 125-128: Replace the shape-only destination validation in SendPage
with StrKey.isValidEd25519PublicKey, importing StrKey from `@stellar/stellar-sdk`
and applying the same validation to scheduled payment creation. Preserve the
existing destError behavior for invalid and valid addresses, and add coverage
for a 56-character G address with an invalid checksum.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 4bfb9411-14c6-4f05-8a32-46211cd487ec
📒 Files selected for processing (1)
apps/src/pages/SendPage.tsx
Summary by CodeRabbit
Closes: Add inline address validation on destination fields #6