Skip to content

Commit

Permalink
support regtest network in coldcard and custom interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
chadchapnick committed Nov 18, 2024
1 parent d5720a2 commit 8b44c53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/caravan-wallets/src/coldcard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
6 changes: 5 additions & 1 deletion packages/caravan-wallets/src/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 8b44c53

Please sign in to comment.