Skip to content

Commit 8e8e34f

Browse files
committed
Make the network public accessible
- Use the new private field construct to make value of network private for setting
1 parent dc70be6 commit 8e8e34f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/IndexerProvider.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ import { WebRequest, BlockcoreDns, ServiceListEntry } from '@blockcore/dns';
33

44
export class IndexerProvider {
55
private dns: BlockcoreDns;
6-
private network = 'STRAX'; // Should we default to BTC?
6+
// private network = 'STRAX'; // Should we default to BTC?
7+
#network = 'STRAX';
8+
9+
public get network(): string {
10+
return this.#network;
11+
}
12+
713
private currentServices: ServiceListEntry[] = [];
814

915
public constructor() {
1016
this.dns = new BlockcoreDns();
1117
}
1218

1319
setNetwork(network: string) {
14-
this.network = network;
20+
this.#network = network;
1521
this.filterServices();
1622
}
1723

0 commit comments

Comments
 (0)