Skip to content

Add Pearl wallet support - #6566

Closed
SeniorZhai wants to merge 5 commits into
masterfrom
feat/support-pearl
Closed

Add Pearl wallet support#6566
SeniorZhai wants to merge 5 commits into
masterfrom
feat/support-pearl

Conversation

@SeniorZhai

Copy link
Copy Markdown
Member

No description provided.

@SeniorZhai
SeniorZhai requested a balanced review from Copilot August 11, 2026 05:42
@SeniorZhai SeniorZhai added the testing Now testing, but you can review label Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
SeniorZhai force-pushed the feat/support-pearl branch 2 times, most recently from b58974d to 34827ad Compare August 11, 2026 06:12
@SeniorZhai
SeniorZhai marked this pull request as ready for review August 17, 2026 03:55
@SeniorZhai SeniorZhai removed the testing Now testing, but you can review label Aug 17, 2026
@SeniorZhai

Copy link
Copy Markdown
Member Author

Rebased onto latest master; opening a new PR.

@SeniorZhai SeniorZhai closed this Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants