Signet support in the frontend.
This commit is contained in:
@@ -17,6 +17,7 @@ export interface ILoadingIndicators { [name: string]: number; }
|
||||
|
||||
export interface Env {
|
||||
TESTNET_ENABLED: boolean;
|
||||
SIGNET_ENABLED: boolean;
|
||||
LIQUID_ENABLED: boolean;
|
||||
BISQ_ENABLED: boolean;
|
||||
BISQ_SEPARATE_BACKEND: boolean;
|
||||
@@ -30,6 +31,7 @@ export interface Env {
|
||||
|
||||
const defaultEnv: Env = {
|
||||
'TESTNET_ENABLED': false,
|
||||
'SIGNET_ENABLED': false,
|
||||
'LIQUID_ENABLED': false,
|
||||
'BISQ_ENABLED': false,
|
||||
'BISQ_SEPARATE_BACKEND': false,
|
||||
@@ -102,7 +104,7 @@ export class StateService {
|
||||
}
|
||||
|
||||
setNetworkBasedonUrl(url: string) {
|
||||
const networkMatches = url.match(/\/(bisq|testnet|liquid)/);
|
||||
const networkMatches = url.match(/\/(bisq|testnet|liquid|signet)/);
|
||||
switch (networkMatches && networkMatches[1]) {
|
||||
case 'liquid':
|
||||
if (this.network !== 'liquid') {
|
||||
@@ -110,6 +112,12 @@ export class StateService {
|
||||
this.networkChanged$.next('liquid');
|
||||
}
|
||||
return;
|
||||
case 'signet':
|
||||
if (this.network !== 'signet') {
|
||||
this.network = 'signet';
|
||||
this.networkChanged$.next('signet');
|
||||
}
|
||||
return;
|
||||
case 'testnet':
|
||||
if (this.network !== 'testnet') {
|
||||
this.network = 'testnet';
|
||||
|
||||
Reference in New Issue
Block a user