Features
diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts
index 4f376eb62..2478958f6 100644
--- a/frontend/src/app/components/transaction/transaction.component.ts
+++ b/frontend/src/app/components/transaction/transaction.component.ts
@@ -159,7 +159,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
);
}),
switchMap((tx) => {
- if (this.network === 'liquid') {
+ if (this.network === 'liquid' || this.network === 'liquidtestnet') {
return from(this.liquidUnblinding.checkUnblindedTx(tx))
.pipe(
catchError((error) => {
diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html
index c49664b06..45c8fb345 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.html
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.html
@@ -48,7 +48,7 @@
-
Coinbase (Newly Generated Coins) {{ vin.scriptsig | hex2ascii }}
+
Coinbase (Newly Generated Coins) {{ vin.scriptsig | hex2ascii }}
Peg-in
@@ -244,7 +244,7 @@
- Confidential
+ Confidential
diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.ts b/frontend/src/app/components/transactions-list/transactions-list.component.ts
index 577bd369d..ac601ab1a 100644
--- a/frontend/src/app/components/transactions-list/transactions-list.component.ts
+++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts
@@ -41,7 +41,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
this.latestBlock$ = this.stateService.blocks$.pipe(map(([block]) => block));
this.stateService.networkChanged$.subscribe((network) => this.network = network);
- if (this.network === 'liquid') {
+ if (this.network === 'liquid' || this.network === 'liquidtestnet') {
this.assetsService.getAssetsMinimalJson$.subscribe((assets) => {
this.assetsMinimal = assets;
});
@@ -99,7 +99,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
}
switchCurrency() {
- if (this.network === 'liquid') {
+ if (this.network === 'liquid' || this.network === 'liquidtestnet') {
return;
}
const oldvalue = !this.stateService.viewFiat$.value;
diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html
index 36c018761..64294c4d3 100644
--- a/frontend/src/app/dashboard/dashboard.component.html
+++ b/frontend/src/app/dashboard/dashboard.component.html
@@ -2,7 +2,7 @@
-
+
-
+
@@ -23,13 +23,13 @@
-
+
-
+
@@ -64,9 +64,9 @@
-
+
-
+
@@ -125,7 +125,7 @@
{{ transaction.txid | shortenString : 10 }}
- Confidential
+ Confidential
{{ transaction.fee / transaction.vsize | feeRounding }} sat/vB
diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts
index 7cc6a2aec..3dbec5ce3 100644
--- a/frontend/src/app/dashboard/dashboard.component.ts
+++ b/frontend/src/app/dashboard/dashboard.component.ts
@@ -262,7 +262,7 @@ export class DashboardComponent implements OnInit {
share(),
);
- if (this.stateService.network === 'liquid') {
+ if (this.stateService.network === 'liquid' || this.stateService.network === 'liquidtestnet') {
this.liquidPegsMonth$ = this.apiService.listLiquidPegsMonth$()
.pipe(
map((pegs) => {
diff --git a/frontend/src/app/services/seo.service.ts b/frontend/src/app/services/seo.service.ts
index 2e1916626..71a57d871 100644
--- a/frontend/src/app/services/seo.service.ts
+++ b/frontend/src/app/services/seo.service.ts
@@ -29,6 +29,8 @@ export class SeoService {
getTitle(): string {
if (this.network === 'liquid')
return 'mempool - Liquid Network';
+ if (this.network === 'liquidtestnet')
+ return 'mempool - Liquid Network Testnet';
if (this.network === 'bisq')
return 'mempool - Bisq Markets';
return 'mempool - ' + (this.network ? this.ucfirst(this.network) : 'Bitcoin') + ' Explorer';
diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts
index 604bb6a87..61b9c291d 100644
--- a/frontend/src/app/services/state.service.ts
+++ b/frontend/src/app/services/state.service.ts
@@ -19,6 +19,7 @@ export interface Env {
TESTNET_ENABLED: boolean;
SIGNET_ENABLED: boolean;
LIQUID_ENABLED: boolean;
+ LIQUID_TESTNET_ENABLED: boolean;
BISQ_ENABLED: boolean;
BISQ_SEPARATE_BACKEND: boolean;
ITEMS_PER_PAGE: number;
@@ -38,6 +39,7 @@ const defaultEnv: Env = {
'TESTNET_ENABLED': false,
'SIGNET_ENABLED': false,
'LIQUID_ENABLED': false,
+ 'LIQUID_TESTNET_ENABLED': false,
'BASE_MODULE': 'mempool',
'BISQ_ENABLED': false,
'BISQ_SEPARATE_BACKEND': false,
@@ -116,7 +118,7 @@ export class StateService {
this.blocks$ = new ReplaySubject<[Block, boolean]>(this.env.KEEP_BLOCKS_AMOUNT);
- if (this.env.BASE_MODULE !== 'mempool') {
+ if (this.env.BASE_MODULE === 'bisq') {
this.network = this.env.BASE_MODULE;
this.networkChanged$.next(this.env.BASE_MODULE);
}
@@ -125,10 +127,10 @@ export class StateService {
}
setNetworkBasedonUrl(url: string) {
- if (this.env.BASE_MODULE !== 'mempool') {
+ if (this.env.BASE_MODULE !== 'mempool' && this.env.BASE_MODULE !== 'liquid') {
return;
}
- const networkMatches = url.match(/\/(bisq|testnet|liquid|signet)/);
+ const networkMatches = url.match(/\/(bisq|testnet|liquidtestnet|liquid|signet)/);
switch (networkMatches && networkMatches[1]) {
case 'liquid':
if (this.network !== 'liquid') {
@@ -136,6 +138,12 @@ export class StateService {
this.networkChanged$.next('liquid');
}
return;
+ case 'liquidtestnet':
+ if (this.network !== 'liquidtestnet') {
+ this.network = 'liquidtestnet';
+ this.networkChanged$.next('liquidtestnet');
+ }
+ return;
case 'signet':
if (this.network !== 'signet') {
this.network = 'signet';
@@ -144,8 +152,13 @@ export class StateService {
return;
case 'testnet':
if (this.network !== 'testnet') {
- this.network = 'testnet';
- this.networkChanged$.next('testnet');
+ if (this.env.BASE_MODULE === 'liquid') {
+ this.network = 'liquidtestnet';
+ this.networkChanged$.next('liquidtestnet');
+ } else {
+ this.network = 'testnet';
+ this.networkChanged$.next('testnet');
+ }
}
return;
case 'bisq':
@@ -155,9 +168,14 @@ export class StateService {
}
return;
default:
- if (this.network !== '') {
- this.network = '';
- this.networkChanged$.next('');
+ if (this.env.BASE_MODULE !== 'mempool' && this.network !== this.env.BASE_MODULE) {
+ this.network = this.env.BASE_MODULE;
+ this.networkChanged$.next(this.env.BASE_MODULE);
+ } else {
+ if (this.network !== '') {
+ this.network = '';
+ this.networkChanged$.next('');
+ }
}
}
}
diff --git a/frontend/src/app/shared/pipes/relative-url/relative-url.pipe.ts b/frontend/src/app/shared/pipes/relative-url/relative-url.pipe.ts
index a19e93a75..2a6cc4d28 100644
--- a/frontend/src/app/shared/pipes/relative-url/relative-url.pipe.ts
+++ b/frontend/src/app/shared/pipes/relative-url/relative-url.pipe.ts
@@ -11,10 +11,13 @@ export class RelativeUrlPipe implements PipeTransform {
) { }
transform(value: string): string {
- if (this.stateService.env.BASE_MODULE !== 'mempool') {
- return '/' + value;
+ let network = this.stateService.network;
+ if (this.stateService.env.BASE_MODULE === 'liquid' && network === 'liquidtestnet') {
+ network = 'testnet';
+ } else if (this.stateService.env.BASE_MODULE !== 'mempool') {
+ network = '';
}
- return (this.stateService.network ? '/' + this.stateService.network : '') + value;
+ return (network ? '/' + network : '') + value;
}
}
diff --git a/frontend/src/resources/liquidtestnet-logo.png b/frontend/src/resources/liquidtestnet-logo.png
new file mode 100644
index 000000000..590016beb
Binary files /dev/null and b/frontend/src/resources/liquidtestnet-logo.png differ
diff --git a/production/mempool-config.liquid-testnet.json b/production/mempool-config.liquid-testnet.json
new file mode 100644
index 000000000..dc29af452
--- /dev/null
+++ b/production/mempool-config.liquid-testnet.json
@@ -0,0 +1,39 @@
+{
+ "MEMPOOL": {
+ "NETWORK": "liquid",
+ "BACKEND": "esplora",
+ "HTTP_PORT": 8998,
+ "MINED_BLOCKS_CACHE": 144,
+ "SPAWN_CLUSTER_PROCS": 0,
+ "API_URL_PREFIX": "/api/v1/",
+ "WEBSOCKET_REFRESH_RATE_MS": 2000
+ },
+ "SYSLOG" : {
+ "MIN_PRIORITY": "debug"
+ },
+ "CORE_RPC": {
+ "PORT": 7041,
+ "USERNAME": "foo",
+ "PASSWORD": "bar"
+ },
+ "SECOND_CORE_RPC": {
+ "PORT": 8332,
+ "USERNAME": "foo",
+ "PASSWORD": "bar"
+ },
+ "ESPLORA": {
+ "REST_API_URL": "http://127.0.0.1:4001"
+ },
+ "DATABASE": {
+ "ENABLED": true,
+ "HOST": "127.0.0.1",
+ "PORT": 3306,
+ "USERNAME": "lmempool",
+ "PASSWORD": "lmempool",
+ "DATABASE": "lmempool"
+ },
+ "STATISTICS": {
+ "ENABLED": true,
+ "TX_PER_SECOND_SAMPLE_PERIOD": 150
+ }
+}
diff --git a/production/mempool-frontend-config.json b/production/mempool-frontend-config.json
index 00f625b10..1a5849f52 100644
--- a/production/mempool-frontend-config.json
+++ b/production/mempool-frontend-config.json
@@ -1,6 +1,7 @@
{
"TESTNET_ENABLED": true,
"LIQUID_ENABLED": true,
+ "LIQUID_TESTNET_ENABLED": true,
"BISQ_ENABLED": true,
"BISQ_SEPARATE_BACKEND": true,
"SIGNET_ENABLED": true,