mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 22:25:34 +01:00
Fixing broken Matomo och bisq and liquid
This commit is contained in:
parent
6cba4a8492
commit
329e9aa034
1 changed files with 17 additions and 11 deletions
|
@ -24,16 +24,16 @@ export class EnterpriseService {
|
||||||
this.subdomain = subdomain;
|
this.subdomain = subdomain;
|
||||||
this.fetchSubdomainInfo();
|
this.fetchSubdomainInfo();
|
||||||
this.disableSubnetworks();
|
this.disableSubnetworks();
|
||||||
} else if (document.location.hostname === 'mempool.space') {
|
} else {
|
||||||
this.insertMatomo();
|
this.insertMatomo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubdomain() {
|
getSubdomain(): string {
|
||||||
return this.subdomain;
|
return this.subdomain;
|
||||||
}
|
}
|
||||||
|
|
||||||
disableSubnetworks() {
|
disableSubnetworks(): void {
|
||||||
this.stateService.env.TESTNET_ENABLED = false;
|
this.stateService.env.TESTNET_ENABLED = false;
|
||||||
this.stateService.env.LIQUID_ENABLED = false;
|
this.stateService.env.LIQUID_ENABLED = false;
|
||||||
this.stateService.env.LIQUID_TESTNET_ENABLED = false;
|
this.stateService.env.LIQUID_TESTNET_ENABLED = false;
|
||||||
|
@ -41,7 +41,7 @@ export class EnterpriseService {
|
||||||
this.stateService.env.BISQ_ENABLED = false;
|
this.stateService.env.BISQ_ENABLED = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchSubdomainInfo() {
|
fetchSubdomainInfo(): void {
|
||||||
this.apiService.getEnterpriseInfo$(this.subdomain).subscribe((info) => {
|
this.apiService.getEnterpriseInfo$(this.subdomain).subscribe((info) => {
|
||||||
this.info = info;
|
this.info = info;
|
||||||
this.insertMatomo(info.site_id);
|
this.insertMatomo(info.site_id);
|
||||||
|
@ -54,14 +54,20 @@ export class EnterpriseService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
insertMatomo(siteId = 5) {
|
insertMatomo(siteId?: number): void {
|
||||||
let statsUrl = '//stats.mempool.space/';
|
let statsUrl = '//stats.mempool.space/';
|
||||||
if (this.document.location.hostname === 'liquid.network') {
|
|
||||||
statsUrl = '//stats.liquid.network/';
|
if (!siteId) {
|
||||||
siteId = 8;
|
siteId = 5;
|
||||||
} else if (this.document.location.hostname === 'bisq.markets') {
|
if (this.document.location.hostname === 'liquid.network') {
|
||||||
statsUrl = '//stats.bisq.markets/';
|
statsUrl = '//stats.liquid.network/';
|
||||||
siteId = 7;
|
siteId = 8;
|
||||||
|
} else if (this.document.location.hostname === 'bisq.markets') {
|
||||||
|
statsUrl = '//stats.bisq.markets/';
|
||||||
|
siteId = 7;
|
||||||
|
} else if (this.document.location.hostname !== 'mempool.space') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
Loading…
Add table
Reference in a new issue