mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Detect federation testnet (#1193)
This commit is contained in:
parent
10bc21d239
commit
add5826a74
@ -75,8 +75,17 @@ export class Federation {
|
|||||||
this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1;
|
this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1;
|
||||||
this.onCoordinatorSaved();
|
this.onCoordinatorSaved();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.exchange.loadingCoordinators = Object.keys(this.coordinators).length;
|
this.exchange.loadingCoordinators = Object.keys(this.coordinators).length;
|
||||||
|
|
||||||
|
const host = getHost();
|
||||||
|
const url = `${window.location.protocol}//${host}`;
|
||||||
|
const tesnetHost = Object.values(this.coordinators).find((coor) => {
|
||||||
|
return Object.values(coor.testnet).includes(url);
|
||||||
|
});
|
||||||
|
if (tesnetHost) settings.network = 'testnet';
|
||||||
|
|
||||||
for (const coor of Object.values(this.coordinators)) {
|
for (const coor of Object.values(this.coordinators)) {
|
||||||
if (coor.enabled) {
|
if (coor.enabled) {
|
||||||
await coor.start(origin, settings, hostUrl, onCoordinatorStarted);
|
await coor.start(origin, settings, hostUrl, onCoordinatorStarted);
|
||||||
|
Loading…
Reference in New Issue
Block a user