New config that lets frontend connect to a separate Bisq mempool backend.

This commit is contained in:
softsimon
2020-07-25 21:21:53 +07:00
parent 0ded140c72
commit 24e40b25fd
5 changed files with 10 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { OptimizedMempoolStats } from '../interfaces/node-api.interface';
import { Observable } from 'rxjs';
import { StateService } from './state.service';
import { env } from '../app.constants';
const API_BASE_URL = '{network}/api/v1';
@@ -18,7 +19,7 @@ export class ApiService {
) {
this.apiBaseUrl = API_BASE_URL.replace('{network}', '');
this.stateService.networkChanged$.subscribe((network) => {
if (network === 'bisq') {
if (network === 'bisq' && !env.BISQ_SEPARATE_BACKEND) {
network = '';
}
this.apiBaseUrl = API_BASE_URL.replace('{network}', network ? '/' + network : '');