From fd869c732d5540e822acb144cb186cd2f75ef52a Mon Sep 17 00:00:00 2001 From: softsimon Date: Mon, 1 Feb 2021 04:17:34 +0700 Subject: [PATCH] Detect network from url also when languages are being used. fixes #287 --- frontend/src/app/services/state.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts index f51d7f9e9..8b66862fc 100644 --- a/frontend/src/app/services/state.service.ts +++ b/frontend/src/app/services/state.service.ts @@ -103,7 +103,8 @@ export class StateService { } setNetworkBasedonUrl(url: string) { - switch (url.split(/\/|\?|#/)[1]) { + const networkMatches = url.match(/\/(bisq|testnet|liquid)/); + switch (networkMatches && networkMatches[1]) { case 'liquid': if (this.network !== 'liquid') { this.network = 'liquid';