Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unknown network error for regtest #156

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stupid-starfishes-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@caravan/wallets": patch
---

support regtest network in coldcard and custom interactions
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
Loading