@@ -29,9 +29,6 @@ export class ApiService {
|
||||
}
|
||||
this.apiBasePath = ''; // assume mainnet by default
|
||||
this.stateService.networkChanged$.subscribe((network) => {
|
||||
if (network === 'bisq' && !this.stateService.env.BISQ_SEPARATE_BACKEND) {
|
||||
network = '';
|
||||
}
|
||||
this.apiBasePath = network ? '/' + network : '';
|
||||
});
|
||||
}
|
||||
|
||||
@@ -25,9 +25,6 @@ export class ElectrsApiService {
|
||||
}
|
||||
this.apiBasePath = ''; // assume mainnet by default
|
||||
this.stateService.networkChanged$.subscribe((network) => {
|
||||
if (network === 'bisq') {
|
||||
network = '';
|
||||
}
|
||||
this.apiBasePath = network ? '/' + network : '';
|
||||
});
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ export class EnterpriseService {
|
||||
this.stateService.env.LIQUID_ENABLED = false;
|
||||
this.stateService.env.LIQUID_TESTNET_ENABLED = false;
|
||||
this.stateService.env.SIGNET_ENABLED = false;
|
||||
this.stateService.env.BISQ_ENABLED = false;
|
||||
}
|
||||
|
||||
fetchSubdomainInfo(): void {
|
||||
@@ -81,14 +80,6 @@ export class EnterpriseService {
|
||||
siteId = 10;
|
||||
statsUrl = '//stats.liquid.network/';
|
||||
break;
|
||||
case 'bisq.markets':
|
||||
siteId = 7;
|
||||
statsUrl = '//stats.bisq.markets/';
|
||||
break;
|
||||
case 'bisq.ninja':
|
||||
statsUrl = '//stats.bisq.markets/';
|
||||
siteId = 11;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -17,12 +17,7 @@ const networkModules = {
|
||||
{ name: 'liquid', path: '' },
|
||||
{ name: 'liquidtestnet', path: '/testnet' },
|
||||
],
|
||||
},
|
||||
bisq: {
|
||||
subnets: [
|
||||
{ name: 'bisq', path: '' },
|
||||
],
|
||||
},
|
||||
}
|
||||
};
|
||||
const networks = Object.keys(networkModules);
|
||||
|
||||
@@ -44,7 +39,7 @@ export class NavigationService {
|
||||
});
|
||||
}
|
||||
|
||||
// For each network (bitcoin/liquid/bisq), find and save the longest url path compatible with the current route
|
||||
// For each network (bitcoin/liquid), find and save the longest url path compatible with the current route
|
||||
updateSubnetPaths(root: ActivatedRouteSnapshot): void {
|
||||
let path = '';
|
||||
const networkPaths = {};
|
||||
|
||||
@@ -71,8 +71,6 @@ export class SeoService {
|
||||
let domain = 'mempool.space';
|
||||
if (this.stateService.env.BASE_MODULE === 'liquid') {
|
||||
domain = 'liquid.network';
|
||||
} else if (this.stateService.env.BASE_MODULE === 'bisq') {
|
||||
domain = 'bisq.markets';
|
||||
}
|
||||
this.canonicalLink.setAttribute('href', 'https://' + domain + path);
|
||||
}
|
||||
@@ -86,8 +84,6 @@ export class SeoService {
|
||||
return this.baseTitle + ' - Liquid Network';
|
||||
if (this.network === 'liquidtestnet')
|
||||
return this.baseTitle + ' - Liquid Testnet';
|
||||
if (this.network === 'bisq')
|
||||
return this.baseTitle + ' - Bisq Markets';
|
||||
return this.baseTitle + ' - ' + (this.network ? this.ucfirst(this.network) : 'Bitcoin') + ' Explorer';
|
||||
}
|
||||
|
||||
@@ -96,8 +92,6 @@ export class SeoService {
|
||||
return this.baseDescription + ' See the real-time status of your transactions, browse network stats, and more.';
|
||||
if ( (this.network === 'liquid') || (this.network === 'liquidtestnet') )
|
||||
return this.baseDescription + ' See Liquid transactions & assets, get network info, and more.';
|
||||
if (this.network === 'bisq')
|
||||
return this.baseDescription + ' See Bisq market prices, trading activity, and more.';
|
||||
}
|
||||
|
||||
ucfirst(str: string) {
|
||||
|
||||
@@ -52,9 +52,6 @@ export class ServicesApiServices {
|
||||
}
|
||||
this.apiBasePath = ''; // assume mainnet by default
|
||||
this.stateService.networkChanged$.subscribe((network) => {
|
||||
if (network === 'bisq' && !this.stateService.env.BISQ_SEPARATE_BACKEND) {
|
||||
network = '';
|
||||
}
|
||||
this.apiBasePath = network ? '/' + network : '';
|
||||
});
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@ export interface Env {
|
||||
SIGNET_ENABLED: boolean;
|
||||
LIQUID_ENABLED: boolean;
|
||||
LIQUID_TESTNET_ENABLED: boolean;
|
||||
BISQ_ENABLED: boolean;
|
||||
BISQ_SEPARATE_BACKEND: boolean;
|
||||
ITEMS_PER_PAGE: number;
|
||||
KEEP_BLOCKS_AMOUNT: number;
|
||||
OFFICIAL_MEMPOOL_SPACE: boolean;
|
||||
@@ -40,7 +38,6 @@ export interface Env {
|
||||
PACKAGE_JSON_VERSION: string;
|
||||
MEMPOOL_WEBSITE_URL: string;
|
||||
LIQUID_WEBSITE_URL: string;
|
||||
BISQ_WEBSITE_URL: string;
|
||||
MINING_DASHBOARD: boolean;
|
||||
LIGHTNING: boolean;
|
||||
AUDIT: boolean;
|
||||
@@ -60,8 +57,6 @@ const defaultEnv: Env = {
|
||||
'LIQUID_ENABLED': false,
|
||||
'LIQUID_TESTNET_ENABLED': false,
|
||||
'BASE_MODULE': 'mempool',
|
||||
'BISQ_ENABLED': false,
|
||||
'BISQ_SEPARATE_BACKEND': false,
|
||||
'ITEMS_PER_PAGE': 10,
|
||||
'KEEP_BLOCKS_AMOUNT': 8,
|
||||
'OFFICIAL_MEMPOOL_SPACE': false,
|
||||
@@ -74,7 +69,6 @@ const defaultEnv: Env = {
|
||||
'PACKAGE_JSON_VERSION': '',
|
||||
'MEMPOOL_WEBSITE_URL': 'https://mempool.space',
|
||||
'LIQUID_WEBSITE_URL': 'https://liquid.network',
|
||||
'BISQ_WEBSITE_URL': 'https://bisq.markets',
|
||||
'MINING_DASHBOARD': true,
|
||||
'LIGHTNING': false,
|
||||
'AUDIT': false,
|
||||
@@ -216,11 +210,6 @@ export class StateService {
|
||||
}
|
||||
}, {}));
|
||||
|
||||
if (this.env.BASE_MODULE === 'bisq') {
|
||||
this.network = this.env.BASE_MODULE;
|
||||
this.networkChanged$.next(this.env.BASE_MODULE);
|
||||
}
|
||||
|
||||
this.networkChanged$.subscribe((network) => {
|
||||
this.transactions$ = new BehaviorSubject<TransactionStripped[]>(null);
|
||||
this.blocksSubject$.next([]);
|
||||
@@ -273,9 +262,9 @@ export class StateService {
|
||||
// /^\/ starts with a forward slash...
|
||||
// (?:[a-z]{2}(?:-[A-Z]{2})?\/)? optional locale prefix (non-capturing)
|
||||
// (?:preview\/)? optional "preview" prefix (non-capturing)
|
||||
// (bisq|testnet|liquidtestnet|liquid|signet)/ network string (captured as networkMatches[1])
|
||||
// (testnet|liquidtestnet|liquid|signet)/ network string (captured as networkMatches[1])
|
||||
// ($|\/) network string must end or end with a slash
|
||||
const networkMatches = url.match(/^\/(?:[a-z]{2}(?:-[A-Z]{2})?\/)?(?:preview\/)?(bisq|testnet|liquidtestnet|liquid|signet)($|\/)/);
|
||||
const networkMatches = url.match(/^\/(?:[a-z]{2}(?:-[A-Z]{2})?\/)?(?:preview\/)?(testnet|liquidtestnet|liquid|signet)($|\/)/);
|
||||
switch (networkMatches && networkMatches[1]) {
|
||||
case 'liquid':
|
||||
if (this.network !== 'liquid') {
|
||||
@@ -306,12 +295,6 @@ export class StateService {
|
||||
}
|
||||
}
|
||||
return;
|
||||
case 'bisq':
|
||||
if (this.network !== 'bisq') {
|
||||
this.network = 'bisq';
|
||||
this.networkChanged$.next('bisq');
|
||||
}
|
||||
return;
|
||||
default:
|
||||
if (this.env.BASE_MODULE !== 'mempool') {
|
||||
if (this.network !== this.env.BASE_MODULE) {
|
||||
|
||||
@@ -54,7 +54,7 @@ export class WebsocketService {
|
||||
.pipe(take(1))
|
||||
.subscribe((response) => this.handleResponse(response));
|
||||
} else {
|
||||
this.network = this.stateService.network === 'bisq' && !this.stateService.env.BISQ_SEPARATE_BACKEND ? '' : this.stateService.network;
|
||||
this.network = this.stateService.network;
|
||||
this.websocketSubject = webSocket<WebsocketResponse>(this.webSocketUrl.replace('{network}', this.network ? '/' + this.network : ''));
|
||||
|
||||
const { response: theInitData } = this.transferState.get<any>(initData, null) || {};
|
||||
@@ -71,9 +71,6 @@ export class WebsocketService {
|
||||
}
|
||||
|
||||
this.stateService.networkChanged$.subscribe((network) => {
|
||||
if (network === 'bisq' && !this.stateService.env.BISQ_SEPARATE_BACKEND) {
|
||||
network = '';
|
||||
}
|
||||
if (network === this.network) {
|
||||
return;
|
||||
}
|
||||
@@ -238,14 +235,6 @@ export class WebsocketService {
|
||||
this.isTrackingRbfSummary = false;
|
||||
}
|
||||
|
||||
startTrackBisqMarket(market: string) {
|
||||
this.websocketSubject.next({ 'track-bisq-market': market });
|
||||
}
|
||||
|
||||
stopTrackingBisqMarket() {
|
||||
this.websocketSubject.next({ 'track-bisq-market': 'stop' });
|
||||
}
|
||||
|
||||
fetchStatistics(historicalDate: string) {
|
||||
this.websocketSubject.next({ historicalDate });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user