Skip to content

Commit

Permalink
Make the network public accessible
Browse files Browse the repository at this point in the history
- Use the new private field construct to make value of network private for setting
  • Loading branch information
sondreb committed Oct 31, 2022
1 parent dc70be6 commit 8e8e34f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/IndexerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ import { WebRequest, BlockcoreDns, ServiceListEntry } from '@blockcore/dns';

export class IndexerProvider {
private dns: BlockcoreDns;
private network = 'STRAX'; // Should we default to BTC?
// private network = 'STRAX'; // Should we default to BTC?
#network = 'STRAX';

public get network(): string {
return this.#network;
}

private currentServices: ServiceListEntry[] = [];

public constructor() {
this.dns = new BlockcoreDns();
}

setNetwork(network: string) {
this.network = network;
this.#network = network;
this.filterServices();
}

Expand Down

0 comments on commit 8e8e34f

Please sign in to comment.