Skip to content

Conversation

@SeniorZhai
Copy link
Member

No description provided.

@SeniorZhai SeniorZhai requested a review from Copilot November 17, 2025 06:54
@SeniorZhai SeniorZhai added the testing Now testing, but you can review label Nov 17, 2025
Copy link
Contributor

Copilot AI left a 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?:"",
Copy link

Copilot AI Nov 17, 2025

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.

Suggested change
iconUrl = token.chainIconUrl?:"",
iconUrl = token.chainIconUrl ?: "",

Copilot uses AI. Check for mistakes.
web3ViewModel.getAssetPrecisionById(assetId).data
},
balanceCheck = { _, _, _, _ ->
// do nothing
Copy link

Copilot AI Nov 17, 2025

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.

Suggested change
// do nothing
// do nothing

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Now testing, but you can review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants