Add CashConnect HD Wallet support#177
Merged
mr-zwets merged 3 commits intocashonize:cashconnect_hd_supportfrom Feb 15, 2026
Merged
Add CashConnect HD Wallet support#177mr-zwets merged 3 commits intocashonize:cashconnect_hd_supportfrom
mr-zwets merged 3 commits intocashonize:cashconnect_hd_supportfrom
Conversation
Signed-off-by: James Zuccon <zuccon@gmail.com>
Signed-off-by: James Zuccon <zuccon@gmail.com>
Signed-off-by: James Zuccon <zuccon@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CashConnect HD wallet support by deriving a CashConnect-specific master key from HD wallets and ensuring transaction-building can sign UTXOs using the correct per-address private keys.
Changes:
- Bump
cashconnectdependency to0.0.25. - Update CashConnect store initialization to support HD wallets (CashConnect purpose
5001) and to sign UTXOs using per-address keys fromwalletCache. - UI/i18n cleanup: remove “HD not supported” messaging and add new CashConnect notification strings.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for cashconnect@0.0.25. |
| package.json | Pins cashconnect dependency to 0.0.25. |
| src/stores/store.ts | Removes HD gating and refactors CashConnect lifecycle management (start/stop, wallet-change handling). |
| src/stores/cashconnectStore.ts | Implements HD master-key derivation and UTXO→privateKey mapping for signing; adds start/stop/disconnect helpers. |
| src/components/connectDapp.vue | Makes CashConnect store always available and always renders CC sessions. |
| src/components/cashconnect/CCSessions.vue | Updates session disconnect action to use store helper. |
| src/components/walletOnboarding.vue | Removes “CashConnect not supported on HD” note in one onboarding flow. |
| src/components/settings/addWallet.vue | Removes “CashConnect not supported on HD” note. |
| src/i18n/locales/en.json | Removes HD-not-supported text and adds new CashConnect notification strings. |
| src/i18n/locales/es.json | Same as en.json for Spanish. |
| src/i18n/locales/fr.json | Same as en.json for French. |
Comments suppressed due to low confidence (2)
src/stores/store.ts:609
initializeCashConnect()only setsisCcInitializedon success. IfcashconnectWallet.start()throws (more likely now that HD derivation/key lookup can fail),isCcInitializedstaysfalseandwaitForInitialized(isWcAndCcInitialized)will wait forever (no timeout). SetisCcInitializedin afinallyblock or introduce a separate “failed” state that unblocks the UI with an error.
} catch (error) {
console.error("Error initializing CashConnect:", error);
Notify.create({
message: t('store.errors.errorInitializingCashConnect'),
icon: 'warning',
src/stores/store.ts:583
useCashconnectStoreexpects aRef<WalletType>(supports HD wallets), but this call site casts_wallettoRef<Wallet>(single-address). Now that CashConnect is intended to work with HD wallets, this cast undermines type-safety and can hide incorrect assumptions. Consider passing_wallet as Ref<WalletType>(fromsrc/interfaces/interfaces) or updating the imported type accordingly.
// Initialize CashConnect.
const cashconnectWallet = useCashconnectStore(_wallet as Ref<Wallet>);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This MR adds HD Wallet support to CashConnect.
How it works (high-level)
wallet.walletCache) to lookup the Private Keys per each address (UTXO).Other Changes
@ts-ignorestatements to be removed (Promise -> Promisable).Other Notes