Add Pearl wallet support - #6566
Closed
SeniorZhai wants to merge 5 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Pearl wallet support across key derivation, address management, wallet import/recovery, balances, and receive flows while disabling unsupported transfers.
Changes:
- Adds Pearl derivation, validation, signing, persistence, and tests.
- Generalizes Bitcoin UTXO synchronization for Pearl.
- Integrates Pearl into wallet UI while gating transfer and swap flows.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
Web3AddressSignatureTest.kt |
Tests UTXO signature flags. |
Web3TransferSupportTest.kt |
Tests Pearl transfer gating. |
UtxoAddressRequirementTest.kt |
Tests address requirements. |
SwapTokenListBottomSheetDialogFragment.kt |
Filters unsupported swap assets. |
Web3TokenListBottomSheetDialogFragment.kt |
Adds Pearl receive selection. |
Web3AddressFragment.kt |
Displays Pearl receive addresses. |
Web3Signer.kt |
Persists Pearl signer addresses. |
ChainNetwork.kt |
Adds Pearl network labels. |
WalletSearchWeb3Fragment.kt |
Includes Pearl in search. |
WalletListBottomSheetDialogFragment.kt |
Enables Pearl wallet selection. |
FetchWalletViewModel.kt |
Derives and imports Pearl wallets. |
SwapTransferBottomSheetDialogFragment.kt |
Blocks unsupported transfers. |
ReImportMnemonicFragment.kt |
Restores Pearl addresses. |
LimitTransferBottomSheetDialogFragment.kt |
Guards limit transfers. |
InputFragment.kt |
Resolves Pearl addresses and blocks sends. |
ImportWalletDetailPage.kt |
Supports Pearl imports. |
FetchWalletPage.kt |
Stores derived Pearl wallet data. |
ClassicWalletRequest.kt |
Creates signed Pearl addresses. |
TipFlowInteractor.kt |
Backfills classic wallet addresses. |
CheckRegisterBottomSheetDialogFragment.kt |
Initializes Pearl after registration. |
TradeFragment.kt |
Excludes unsupported Pearl trading. |
GasCheckBottomSheetDialogFragment.kt |
Prevents unsupported fee checks. |
MainActivity.kt |
Detects missing UTXO addresses. |
LoginVerifyBottomSheetDialogFragment.kt |
Backfills UTXO addresses after login. |
TipSign.kt |
Adds classic Pearl derivation. |
Bip44.kt |
Defines Pearl derivation paths. |
Web3Repository.kt |
Generalizes UTXO balance refresh. |
TokenRepository.kt |
Handles Pearl UTXO transactions. |
RefreshWeb3UtxoJob.kt |
Adds generic UTXO synchronization. |
RefreshWeb3TransactionsJob.kt |
Applies UTXO balances. |
RefreshWeb3TokenJob.kt |
Schedules UTXO refreshes. |
RefreshWeb3Job.kt |
Synchronizes Pearl outputs. |
RefreshWeb3BitCoinJob.kt |
Delegates Bitcoin refresh logic. |
RefreshSingleWalletJob.kt |
Refreshes all UTXO assets. |
RefreshSafeAccountsJob.kt |
Applies generalized balances. |
RefreshOrdersJob.kt |
Applies generalized balances. |
BaseJob.kt |
Generalizes UTXO helpers. |
ContextExtension.kt |
Adds Pearl deposit guidance. |
Web3TokenItem.kt |
Adds Pearl metadata and transfer gating. |
PearlKeyGenerator.kt |
Implements Pearl cryptography. |
CryptoWalletHelper.kt |
Adds Pearl wallet utilities. |
Constants.kt |
Defines Pearl identifiers. |
MnemonicAddressDerivationTest.kt |
Tests Pearl derivation vectors. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| chainIdSet.contains(token.chain.chainId) | ||
| } | ||
| } | ||
| }).filter { inMixin() || isWeb3TransferSupported(it.chain.chainId) } |
Comment on lines
+395
to
+403
| val walletId = web3Repository.getClassicWalletId() ?: return false | ||
| val existingChainIds = web3Repository.getAddresses(walletId).mapTo(mutableSetOf()) { it.chainId } | ||
| val missingChainIds = setOf(Constants.ChainId.BITCOIN_CHAIN_ID, PEARL_CHAIN_ID) - existingChainIds | ||
| if (missingChainIds.isEmpty()) { | ||
| return true | ||
| } | ||
| val spendKey = tip.getSpendKeyFromPin(context, pin) | ||
| val missingAddresses = buildClassicUtxoAddressRequests(spendKey, INITIAL_CLASSIC_WALLET_INDEX) | ||
| .filter { it.chainId in missingChainIds } |
Comment on lines
+109
to
+113
| val data = org.bitcoinj.base.Bech32.decode(address) | ||
| data.hrp == PEARL_HRP && | ||
| data.encoding == org.bitcoinj.base.Bech32.Encoding.BECH32M && | ||
| data.bytes().size == 53 && | ||
| data.bytes().firstOrNull()?.toInt() == 1 |
SeniorZhai
force-pushed
the
feat/support-pearl
branch
2 times, most recently
from
August 11, 2026 06:12
b58974d to
34827ad
Compare
SeniorZhai
marked this pull request as ready for review
August 17, 2026 03:55
SeniorZhai
force-pushed
the
feat/support-pearl
branch
from
August 17, 2026 07:38
637d8aa to
c2dc2e9
Compare
Member
Author
|
Rebased onto latest master; opening a new PR. |
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.
No description provided.