From ad2d7af084be5659d6beefb9f39b8b0102cce538 Mon Sep 17 00:00:00 2001 From: natsoni Date: Wed, 26 Jun 2024 10:48:17 +0900 Subject: [PATCH] Force amounts to BTC unit in pool page --- frontend/src/app/components/amount/amount.component.html | 4 ++-- frontend/src/app/components/amount/amount.component.ts | 1 + frontend/src/app/components/pool/pool.component.html | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/components/amount/amount.component.html b/frontend/src/app/components/amount/amount.component.html index b38cf4c41..b513c89d2 100644 --- a/frontend/src/app/components/amount/amount.component.html +++ b/frontend/src/app/components/amount/amount.component.html @@ -1,4 +1,4 @@ - + {{ addPlus && satoshis >= 0 ? '+' : '' }}{{ ( @@ -21,7 +21,7 @@ Confidential - @if ((viewAmountMode$ | async) === 'btc' || (viewAmountMode$ | async) === 'fiat') { + @if ((viewAmountMode$ | async) === 'btc' || (viewAmountMode$ | async) === 'fiat' || ignoreViewMode === true) { ‎{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis / 100000000 | number : digitsInfo }} BTC diff --git a/frontend/src/app/components/amount/amount.component.ts b/frontend/src/app/components/amount/amount.component.ts index 60cbe3117..93715f3c0 100644 --- a/frontend/src/app/components/amount/amount.component.ts +++ b/frontend/src/app/components/amount/amount.component.ts @@ -24,6 +24,7 @@ export class AmountComponent implements OnInit, OnDestroy { @Input() addPlus = false; @Input() blockConversion: Price; @Input() forceBtc: boolean = false; + @Input() ignoreViewMode: boolean = false; @Input() forceBlockConversion: boolean = false; // true = displays fiat price as 0 if blockConversion is undefined instead of falling back to conversions constructor( diff --git a/frontend/src/app/components/pool/pool.component.html b/frontend/src/app/components/pool/pool.component.html index a446b552b..bd4f3bbee 100644 --- a/frontend/src/app/components/pool/pool.component.html +++ b/frontend/src/app/components/pool/pool.component.html @@ -97,7 +97,7 @@ - + {{ poolStats.estimatedHashrate | amountShortener : 1 : 'H/s' }} - + @@ -219,10 +219,10 @@ - + - + {{ block.tx_count | number }}