Liquid and Testnet now accessable from the main site

fixes #35
This commit is contained in:
softsimon
2020-05-09 20:37:50 +07:00
parent 4932d6f706
commit 7974cbbc83
45 changed files with 452 additions and 162 deletions

View File

@@ -11,7 +11,7 @@
</ng-template>
<div>
<a [routerLink]="['/tx/', txId]" style="line-height: 56px;">
<a [routerLink]="['/tx/' | relativeUrl, txId]" style="line-height: 56px;">
<span class="d-inline d-lg-none">{{ txId | shortenString : 24 }}</span>
<span class="d-none d-lg-inline">{{ txId }}</span>
</a>
@@ -33,7 +33,7 @@
<tr>
<td class="td-width">Included in block</td>
<td>
<a [routerLink]="['/block/', tx.status.block_hash]" [state]="{ data: { blockHeight: tx.status.block_height } }">{{ tx.status.block_height }}</a>
<a [routerLink]="['/block/' | relativeUrl, tx.status.block_hash]" [state]="{ data: { blockHeight: tx.status.block_height } }">{{ tx.status.block_height }}</a>
<i> (<app-time-since [time]="tx.status.block_time" [fastRender]="true"></app-time-since> ago)</i>
</td>
</tr>

View File

@@ -9,7 +9,6 @@ import { WebsocketService } from '../../services/websocket.service';
import { AudioService } from 'src/app/services/audio.service';
import { ApiService } from 'src/app/services/api.service';
import { SeoService } from 'src/app/services/seo.service';
import { environment } from '../../../environments/environment';
@Component({
selector: 'app-transaction',
@@ -17,7 +16,7 @@ import { environment } from '../../../environments/environment';
styleUrls: ['./transaction.component.scss']
})
export class TransactionComponent implements OnInit, OnDestroy {
network = environment.network;
network = '';
tx: Transaction;
txId: string;
feeRating: number;
@@ -44,6 +43,8 @@ export class TransactionComponent implements OnInit, OnDestroy {
) { }
ngOnInit() {
this.stateService.networkChanged$.subscribe((network) => this.network = network);
this.subscription = this.route.paramMap.pipe(
switchMap((params: ParamMap) => {
this.txId = params.get('id') || '';