mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 10:21:52 +01:00
parent
6a9c4d82ec
commit
f3c18b152a
@ -16,14 +16,9 @@ class Donations {
|
|||||||
|
|
||||||
sponsorsCache: any[] = [];
|
sponsorsCache: any[] = [];
|
||||||
|
|
||||||
constructor() {
|
constructor() {}
|
||||||
if (!config.SPONSORS.ENABLED) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$updateCache();
|
|
||||||
}
|
|
||||||
|
|
||||||
async $updateCache() {
|
public async $updateCache() {
|
||||||
try {
|
try {
|
||||||
this.sponsorsCache = await this.$getDonationsFromDatabase('handle, image');
|
this.sponsorsCache = await this.$getDonationsFromDatabase('handle, image');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -85,12 +85,16 @@ class Server {
|
|||||||
statistics.startStatistics();
|
statistics.startStatistics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fiatConversion.startService();
|
||||||
|
|
||||||
|
if (config.SPONSORS.ENABLED) {
|
||||||
|
donations.$updateCache();
|
||||||
|
}
|
||||||
|
|
||||||
this.setUpHttpApiRoutes();
|
this.setUpHttpApiRoutes();
|
||||||
this.setUpWebsocketHandling();
|
this.setUpWebsocketHandling();
|
||||||
this.runMainUpdateLoop();
|
this.runMainUpdateLoop();
|
||||||
|
|
||||||
fiatConversion.startService();
|
|
||||||
|
|
||||||
if (config.BISQ_BLOCKS.ENABLED) {
|
if (config.BISQ_BLOCKS.ENABLED) {
|
||||||
bisq.startBisqService();
|
bisq.startBisqService();
|
||||||
bisq.setPriceCallbackFunction((price) => websocketHandler.setExtraInitProperties('bsq-price', price));
|
bisq.setPriceCallbackFunction((price) => websocketHandler.setExtraInitProperties('bsq-price', price));
|
||||||
|
Loading…
Reference in New Issue
Block a user