mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Fix loading coordinators calc
This commit is contained in:
parent
f8e636e83c
commit
9f440ecf32
@ -183,6 +183,7 @@ export class Federation {
|
|||||||
|
|
||||||
for (const coor of Object.values(this.coordinators)) {
|
for (const coor of Object.values(this.coordinators)) {
|
||||||
coor.loadInfo(() => {
|
coor.loadInfo(() => {
|
||||||
|
this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1;
|
||||||
this.onCoordinatorSaved();
|
this.onCoordinatorSaved();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -205,14 +206,15 @@ export class Federation {
|
|||||||
loadBook = async (): Promise<void> => {
|
loadBook = async (): Promise<void> => {
|
||||||
if (this.connection !== 'api') return;
|
if (this.connection !== 'api') return;
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.book = {};
|
this.book = {};
|
||||||
this.triggerHook('onFederationUpdate');
|
this.loading = true;
|
||||||
|
this.exchange.onlineCoordinators = 0;
|
||||||
this.exchange.loadingCoordinators = Object.keys(this.coordinators).length;
|
this.exchange.loadingCoordinators = Object.keys(this.coordinators).length;
|
||||||
|
this.triggerHook('onFederationUpdate');
|
||||||
for (const coor of Object.values(this.coordinators)) {
|
for (const coor of Object.values(this.coordinators)) {
|
||||||
coor.loadBook(() => {
|
coor.loadBook(() => {
|
||||||
|
this.exchange.onlineCoordinators = this.exchange.onlineCoordinators + 1;
|
||||||
this.onCoordinatorSaved();
|
this.onCoordinatorSaved();
|
||||||
this.triggerHook('onFederationUpdate');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user