From 17cc2ded4ced3903fb5bd062fa8ee10fb2235ec0 Mon Sep 17 00:00:00 2001 From: natsoni Date: Wed, 9 Apr 2025 13:01:10 +0200 Subject: [PATCH] Enable offline mode when previewing coinbase --- frontend/src/app/components/pool/pool.component.html | 2 +- .../stratum/stratum-list/stratum-list.component.html | 2 +- .../app/components/transaction/transaction-raw.component.ts | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/components/pool/pool.component.html b/frontend/src/app/components/pool/pool.component.html index bd82c151d..cc9e85a07 100644 --- a/frontend/src/app/components/pool/pool.component.html +++ b/frontend/src/app/components/pool/pool.component.html @@ -220,7 +220,7 @@ - + Coinbase tag   diff --git a/frontend/src/app/components/stratum/stratum-list/stratum-list.component.html b/frontend/src/app/components/stratum/stratum-list/stratum-list.component.html index 3de251b09..406db5461 100644 --- a/frontend/src/app/components/stratum/stratum-list/stratum-list.component.html +++ b/frontend/src/app/components/stratum/stratum-list/stratum-list.component.html @@ -45,7 +45,7 @@ - + {{ row.job.height }} diff --git a/frontend/src/app/components/transaction/transaction-raw.component.ts b/frontend/src/app/components/transaction/transaction-raw.component.ts index a4d20b040..efdabf036 100644 --- a/frontend/src/app/components/transaction/transaction-raw.component.ts +++ b/frontend/src/app/components/transaction/transaction-raw.component.ts @@ -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