-
Notifications
You must be signed in to change notification settings - Fork 111
Feature/btc #6057
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?
Feature/btc #6057
Conversation
# Conflicts: # app/src/main/java/one/mixin/android/crypto/CryptoWalletHelper.kt
# Conflicts: # app/src/sharedTest/java/one.mixin.android.mock/AccountMock.kt
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 Bitcoin (BTC) support to the wallet feature, enabling users to manage Bitcoin in their classic wallets.
Key Changes
- Added Bitcoin SegWit address generation and transaction signing support
- Introduced UTXO management with a new
outputsdatabase table - Created UI for prompting users to add Bitcoin addresses to existing classic wallets
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Added English strings for Bitcoin wallet introduction feature |
| app/src/main/res/values-zh-rTW/strings.xml | Added Traditional Chinese translations for Bitcoin feature |
| app/src/main/res/values-zh-rCN/strings.xml | Added Simplified Chinese translations for Bitcoin feature |
| app/src/main/res/layout/fragment_classic_wallet_missing_btc_address_intro.xml | New layout for Bitcoin address introduction screen |
| app/src/main/res/layout/fragment_classic_wallet_missing_btc_address_bottom_sheet.xml | New bottom sheet layout for Bitcoin address setup |
| app/src/main/res/drawable/*.xml | Added vector drawables for Bitcoin wallet features (with naming issues) |
| app/src/main/java/one/mixin/android/ui/wallet/ClassicWalletMissingBtcAddressFragment.kt | New fragment handling Bitcoin address addition to classic wallets |
| app/src/main/java/one/mixin/android/ui/home/MainActivity.kt | Integrated Bitcoin address check before wallet navigation |
| app/src/main/java/one/mixin/android/web3/js/Web3Signer.kt | Added Bitcoin transaction signing logic |
| app/src/main/java/one/mixin/android/tip/TipSign.kt | Added Bitcoin key derivation using BIP84 (SegWit) |
| app/src/main/java/one/mixin/android/crypto/CryptoWalletHelper.kt | Added Bitcoin address generation methods for SegWit and Taproot |
| app/src/main/java/one/mixin/android/db/WalletDatabase.kt | Added database migration to version 7 with outputs table |
| app/src/main/java/one/mixin/android/db/web3/WalletOutputDao.kt | New DAO for managing Bitcoin UTXOs |
| app/src/main/java/one/mixin/android/api/response/web3/WalletOutput.kt | New data model for Bitcoin outputs (UTXOs) |
| app/src/main/java/one/mixin/android/job/RefreshWeb3BitCoinJob.kt | New job for refreshing Bitcoin UTXO data |
| app/build.gradle | Updated BouncyCastle dependency version management |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,15 @@ | |||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |||
Copilot
AI
Jan 5, 2026
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.
The drawable filename contains a typo. "saemless" should be "seamless".
app/src/main/res/layout/fragment_wallet_missing_btc_address_intro.xml
Outdated
Show resolved
Hide resolved
app/src/main/res/layout/fragment_wallet_missing_btc_address_intro.xml
Outdated
Show resolved
Hide resolved
app/src/main/java/one/mixin/android/db/web3/vo/Web3TokenItem.kt
Outdated
Show resolved
Hide resolved
| web3Token != null && (chainToken == null || gas == null || (chainToken?.balance?.toBigDecimalOrNull() ?: BigDecimal.ZERO) < gas || | ||
| (web3Token?.assetId == chainToken?.assetId && (gas ?: BigDecimal.ZERO).add(BigDecimal(v)) > (web3Token?.balance?.toBigDecimalOrNull() ?: BigDecimal.ZERO))) |
Copilot
AI
Jan 5, 2026
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.
The conditional logic appears to have incorrect balance comparison. The chain token balance check should have proper parentheses grouping to ensure the comparison operators work correctly.
# Conflicts: # app/src/main/java/one/mixin/android/job/BaseJob.kt # app/src/main/java/one/mixin/android/job/RefreshWeb3Job.kt # app/src/main/java/one/mixin/android/ui/common/LoginVerifyBottomSheetDialogFragment.kt # app/src/main/java/one/mixin/android/ui/home/MainActivity.kt
# Conflicts: # app/src/main/java/one/mixin/android/job/BaseJob.kt # app/src/main/java/one/mixin/android/job/RefreshWeb3Job.kt # app/src/main/java/one/mixin/android/ui/common/LoginVerifyBottomSheetDialogFragment.kt # app/src/main/java/one/mixin/android/ui/home/MainActivity.kt
677ab52 to
d508a7f
Compare
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
Copilot reviewed 87 out of 89 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
97898d6 to
6177de5
Compare
6177de5 to
fc9df62
Compare
# Conflicts: # app/src/main/java/one/mixin/android/job/BaseJob.kt # app/src/main/java/one/mixin/android/job/RefreshWeb3Job.kt # app/src/main/java/one/mixin/android/ui/common/BottomSheetViewModel.kt # app/src/main/java/one/mixin/android/ui/common/LoginVerifyBottomSheetDialogFragment.kt # app/src/main/java/one/mixin/android/ui/tip/TipFragment.kt
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
Copilot reviewed 79 out of 81 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.