Skip to content

Commit

Permalink
fix: inscribe api network error
Browse files Browse the repository at this point in the history
  • Loading branch information
AricRedemption committed May 14, 2024
1 parent ef16bf1 commit e9ff443
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ export async function getNetwork(): Promise<Network> {
}

export function getBtcNetwork() {
return network.value === 'mainnet' ? networks.bitcoin : networks.testnet
switch (network.value) {
case 'mainnet':
return networks.bitcoin
case 'testnet':
return networks.testnet
case 'regtest':
return networks.regtest
default:
throw new Error('Unknown network')
}
}

export function getNet(): Net {
Expand Down

0 comments on commit e9ff443

Please sign in to comment.