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 } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Block, Transaction, Address, Outspend, Recent, Asset } from '../interfaces/electrs.interface';
import { StateService } from './state.service';
import { env } from '../app.constants';
const API_BASE_URL = '{network}/api';
@@ -18,7 +19,7 @@ export class ElectrsApiService {
) {
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 : '');