From 9dbf3b54fbd381e31618ca5000563eccc46712af Mon Sep 17 00:00:00 2001 From: softsimon Date: Sat, 15 Jun 2024 05:18:35 +0200 Subject: [PATCH] Electrs network routing fix --- frontend/src/app/lightning/lightning-api.service.ts | 2 +- frontend/src/app/services/electrs-api.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/lightning/lightning-api.service.ts b/frontend/src/app/lightning/lightning-api.service.ts index 736c12c13..200a24c58 100644 --- a/frontend/src/app/lightning/lightning-api.service.ts +++ b/frontend/src/app/lightning/lightning-api.service.ts @@ -23,7 +23,7 @@ export class LightningApiService { } this.apiBasePath = ''; // assume mainnet by default this.stateService.networkChanged$.subscribe((network) => { - this.apiBasePath = network ? '/' + network : ''; + this.apiBasePath = network && network !== this.stateService.env.DEFAULT_NETWORK ? '/' + network : ''; }); } diff --git a/frontend/src/app/services/electrs-api.service.ts b/frontend/src/app/services/electrs-api.service.ts index 57dcbb762..974efea52 100644 --- a/frontend/src/app/services/electrs-api.service.ts +++ b/frontend/src/app/services/electrs-api.service.ts @@ -25,7 +25,7 @@ export class ElectrsApiService { } this.apiBasePath = ''; // assume mainnet by default this.stateService.networkChanged$.subscribe((network) => { - this.apiBasePath = network ? '/' + network : ''; + this.apiBasePath = network && network !== this.stateService.env.DEFAULT_NETWORK ? '/' + network : ''; }); }