Skip to content

Commit e69aaa9

Browse files
committed
Fix network for MockNetworkProvider (#207)
1 parent 43d7f0b commit e69aaa9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

packages/cashscript/src/interfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export const Network = {
104104
TESTNET3: literal('testnet3'),
105105
TESTNET4: literal('testnet4'),
106106
CHIPNET: literal('chipnet'),
107+
MOCKNET: literal('mocknet'),
107108
REGTEST: literal('regtest'),
108109
};
109110

packages/cashscript/src/network/MockNetworkProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const carolAddress = 'bchtest:qqsr7nqwe6rq5crj63gy5gdqchpnwmguusmr7tfmsj';
1212
export default class MockNetworkProvider implements NetworkProvider {
1313
private utxoMap: Record<string, Utxo[]> = {};
1414
private transactionMap: Record<string, string> = {};
15-
public network: Network = Network.CHIPNET;
15+
public network: Network = Network.MOCKNET;
1616

1717
constructor() {
1818
for (let i = 0; i < 3; i += 1) {

packages/cashscript/src/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export function getNetworkPrefix(network: string): 'bitcoincash' | 'bchtest' | '
270270
case Network.TESTNET4:
271271
case Network.TESTNET3:
272272
case Network.CHIPNET:
273+
case Network.MOCKNET:
273274
return 'bchtest';
274275
case Network.REGTEST:
275276
return 'bchreg';

0 commit comments

Comments
 (0)