-
Notifications
You must be signed in to change notification settings - Fork 109
Update wallet generate #5704
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?
Update wallet generate #5704
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 updates wallet generation functionality by adding support for creating new multi-chain wallets with variable BIP44 derivation path indices. The changes primarily focus on adding a classic wallet creation feature with proper UI components and updating the BIP44 path generation to support indexed addresses.
- Updates BIP44 derivation paths to accept variable indices instead of hardcoded values
- Adds new UI flow for creating classic wallets with multi-chain support
- Implements wallet renaming functionality for classic wallets
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Bip44Test.kt | Updates test cases to use new indexed BIP44 path functions |
strings.xml | Adds new string resources for wallet creation UI |
view_classic_wallet_bottom.xml | Adds rename option to classic wallet bottom sheet |
fragment_add_wallet_bottom_sheet.xml | Adds create new wallet option to wallet selection UI |
ic_wallet_create.xml | New icon resource for wallet creation |
ic_menu_create_wallet.xml | New menu icon for wallet creation |
FetchWalletViewModel.kt | Implements classic wallet creation logic |
ImportWalletDetailPage.kt | Adds EVM address checksum conversion for watch addresses |
CreateWalletNoticePage.kt | New compose page for wallet creation notice |
AssetDashboardScreen.kt | Adds name parameter to wallet card display |
WalletSecurityActivity.kt | Adds CREATE_WALLET mode support |
WalletFragment.kt | Implements wallet renaming and title display logic |
VerifyPinBeforeImportWalletFragment.kt | Adds navigation for wallet creation flow |
CreateWalletNoticeFragment.kt | New fragment for wallet creation notice |
AddWalletBottomSheetDialogFragment.kt | Adds create wallet action to bottom sheet |
Bip44.kt | Refactors path generation to support variable indices |
TipSign.kt | Updates signature functions to use indexed paths |
Web3Repository.kt | Adds method to get maximum classic wallet index |
RefreshWeb3Job.kt | Updates default wallet name to use string resource |
@@ -127,7 +128,7 @@ fun tipPrivToPrivateKey( | |||
} | |||
else -> { | |||
val addressFromGo = Blockchain.generateEthereumAddress(priv.hexString()) | |||
val bip44KeyPair = generateBip44Key(masterKeyPair, Bip44Path.Ethereum) | |||
val bip44KeyPair = generateBip44Key(masterKeyPair, Bip44Path.solana(index)) |
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.
This line uses Bip44Path.solana(index)
for Ethereum address generation, but it should use Bip44Path.ethereum(index)
to match the intended chain type.
val bip44KeyPair = generateBip44Key(masterKeyPair, Bip44Path.solana(index)) | |
val bip44KeyPair = generateBip44Key(masterKeyPair, Bip44Path.ethereum(index)) |
Copilot uses AI. Check for mistakes.
}.maxOrNull() ?: 0 | ||
val name = "${MixinApplication.appContext.getString(R.string.Common_Wallet)} ${maxIndex + 1}" | ||
val evmAddress = privateKeyToAddress(currentSpendKey, Constants.ChainId.ETHEREUM_CHAIN_ID, classicIndex) | ||
val solAddress =privateKeyToAddress(currentSpendKey, Constants.ChainId.SOLANA_CHAIN_ID, classicIndex) |
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.
Missing space after the equals sign. Should be val solAddress = privateKeyToAddress(...)
.
val solAddress =privateKeyToAddress(currentSpendKey, Constants.ChainId.SOLANA_CHAIN_ID, classicIndex) | |
val solAddress = privateKeyToAddress(currentSpendKey, Constants.ChainId.SOLANA_CHAIN_ID, classicIndex) |
Copilot uses AI. Check for mistakes.
# Conflicts: # app/src/main/java/one/mixin/android/repository/Web3Repository.kt
f094bbe
to
6ccc0ca
Compare
644727a
to
9cdcfe7
Compare
…create_wallet # Conflicts: # app/src/main/java/one/mixin/android/ui/address/TransferDestinationInputFragment.kt
a766b3d
to
4c5532b
Compare
No description provided.