Enable offline mode when previewing coinbase

This commit is contained in:
natsoni 2025-04-09 13:01:10 +02:00
parent be2c57e020
commit 17cc2ded4c
No known key found for this signature in database
GPG Key ID: C65917583181743B
3 changed files with 6 additions and 4 deletions

View File

@ -220,7 +220,7 @@
<thead>
<tr>
<th class="data-title clip text-center coinbase" i18n="latest-blocks.coinbasetag">
<a class="title-link" [routerLink]="['/tx/preview' | relativeUrl]" [fragment]="'hex=' + job.coinbase">
<a class="title-link" [routerLink]="['/tx/preview' | relativeUrl]" [fragment]="'offline=true&hex=' + job.coinbase">
Coinbase tag <span>&nbsp;</span>
<fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: text-top; font-size: 13px; color: var(--title-fg)"></fa-icon>
</a>

View File

@ -45,7 +45,7 @@
<app-amount [satoshis]="row.job.reward"></app-amount>
</td>
<td class="height">
<a [routerLink]="['/tx/preview' | relativeUrl]" [fragment]="'hex=' + row.job.coinbase">
<a [routerLink]="['/tx/preview' | relativeUrl]" [fragment]="'offline=true&hex=' + row.job.coinbase">
{{ row.job.height }}
</a>
</td>

View File

@ -86,12 +86,14 @@ export class TransactionRawComponent implements OnInit, OnDestroy {
const hex = params.get('hex');
if (hex) {
this.pushTxForm.get('txRaw').setValue(hex);
this.decodeTransaction();
}
const offline = params.get('offline');
if (offline) {
this.offlineMode = offline === 'true';
}
if (this.pushTxForm.get('txRaw').value) {
this.decodeTransaction();
}
}
});
}
@ -281,7 +283,6 @@ export class TransactionRawComponent implements OnInit, OnDestroy {
this.filters = [];
this.hasPrevouts = false;
this.missingPrevouts = [];
this.offlineMode = false;
this.stateService.markBlock$.next({});
this.mempoolBlocksSubscription?.unsubscribe();
this.broadcastSubscription?.unsubscribe();
@ -290,6 +291,7 @@ export class TransactionRawComponent implements OnInit, OnDestroy {
resetForm() {
this.resetState();
this.pushTxForm.get('txRaw').setValue('');
this.offlineMode = false;
this.router.navigate([], {
fragment: '',
replaceUrl: true