Fix incorrect error message for invalid address#3136
Merged
Conversation
Contributor
WalkthroughAdded destination address validation in the Send flow to verify addresses against the target chain before gas fee calculation. The validation occurs in two locations within the send path, throwing an Changes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
62feb8a to
f1e2765
Compare
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@app/src/main/java/com/vultisig/wallet/ui/models/send/SendFormViewModel.kt`:
- Around line 1067-1071: The pre-validation using
chainAccountAddressRepository.isValid in SendFormViewModel blocks ENS/alias
inputs before addressParserRepository.resolveName can run; change the logic in
the send flow to only check for blank input at this point (e.g., ensure
addressFieldState.text is not empty) and remove or skip the isValid(...) call
here, then perform full validation of the resolved address after calling
addressParserRepository.resolveName and before constructing the transaction (use
chainAccountAddressRepository.isValid on the resolved result). Adjust references
in SendFormViewModel to ensure resolution happens first and validation happens
on the resolved address.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Please include a summary of the change and which issue is fixed.
Fixes #3079
Which feature is affected?
Checklist
Screenshots (if applicable):
Additional context
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.