Adding Liquid Testnet as frontend option

fixes #976
This commit is contained in:
softsimon
2021-12-27 22:54:45 +04:00
parent dd767f9468
commit fd34761a93
38 changed files with 342 additions and 72 deletions

View File

@@ -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;
}
}