-
Notifications
You must be signed in to change notification settings - Fork 111
Parse external url #5951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Parse external url #5951
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for parsing external URLs (Ethereum and Solana) in Web3 transfers. The implementation enables handling of special URL schemes for Web3 tokens similar to how existing external transfer URLs are handled.
- Added URL parsing functionality for Ethereum and Solana URLs in Web3 context
- Implemented new methods to validate addresses, fetch fees, and process external transfers for Web3 tokens
- Removed several unused methods from Web3ViewModel to clean up the codebase
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/main/java/one/mixin/android/ui/home/web3/Web3ViewModel.kt | Added methods for Web3 token validation, external address handling, and asset lookup; removed unused legacy methods |
| app/src/main/java/one/mixin/android/ui/address/TransferDestinationInputFragment.kt | Implemented URL parsing and handling logic for Web3 external transfers including Ethereum and Solana schemes |
| app/src/main/java/one/mixin/android/repository/Web3Repository.kt | Added findAndRefreshWeb3TokenItem method to fetch or sync Web3 tokens with fallback to remote API |
| app/src/main/java/one/mixin/android/extension/UrlExtension.kt | Added utility function to detect Ethereum and Solana URL schemes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| assetKey = token.assetKey ?: "", | ||
| name = token.name, | ||
| symbol = token.symbol, | ||
| iconUrl = token.chainIconUrl?:"", |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Missing space after colon. Should be iconUrl = token.chainIconUrl ?: "" for consistency with Kotlin style conventions.
| iconUrl = token.chainIconUrl?:"", | |
| iconUrl = token.chainIconUrl ?: "", |
| web3ViewModel.getAssetPrecisionById(assetId).data | ||
| }, | ||
| balanceCheck = { _, _, _, _ -> | ||
| // do nothing |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Use proper comment formatting with consistent indentation. The comment should be aligned with the code on line 159 for better readability.
| // do nothing | |
| // do nothing |
No description provided.