From 8b44c53b029c94018b1d6798d94a9b28186f031f Mon Sep 17 00:00:00 2001 From: Chad Date: Mon, 18 Nov 2024 14:47:24 -0600 Subject: [PATCH] support regtest network in coldcard and custom interactions --- packages/caravan-wallets/src/coldcard.ts | 6 +++++- packages/caravan-wallets/src/custom.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/caravan-wallets/src/coldcard.ts b/packages/caravan-wallets/src/coldcard.ts index 65843b1a..d53000db 100644 --- a/packages/caravan-wallets/src/coldcard.ts +++ b/packages/caravan-wallets/src/coldcard.ts @@ -75,7 +75,11 @@ class ColdcardMultisigSettingsFileParser extends ColdcardInteraction { bip32Path: string; }) { super(); - if ([Network.MAINNET, Network.TESTNET].find((net) => net === network)) { + if ( + [Network.MAINNET, Network.TESTNET, Network.REGTEST].find( + (net) => net === network + ) + ) { this.network = network; } else { throw new Error("Unknown network."); diff --git a/packages/caravan-wallets/src/custom.ts b/packages/caravan-wallets/src/custom.ts index 7febc3f6..e207b729 100644 --- a/packages/caravan-wallets/src/custom.ts +++ b/packages/caravan-wallets/src/custom.ts @@ -68,7 +68,11 @@ export class CustomExportExtendedPublicKey extends CustomInteraction { constructor({ network, bip32Path }) { super(); - if ([Network.MAINNET, Network.TESTNET].find((net) => net === network)) { + if ( + [Network.MAINNET, Network.TESTNET, Network.REGTEST].find( + (net) => net === network + ) + ) { this.network = network; } else { throw new Error("Unknown network.");