From 3801f988ba9e612c9619aeb65d0290a95c9647b0 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Fri, 2 Sep 2022 16:17:48 +0200 Subject: [PATCH] Show '-' when value is not defined in channel page --- .../channel/channel-box/channel-box.component.html | 10 +++++----- .../app/shared/components/sats/sats.component.html | 13 ++++++++----- .../app/shared/components/sats/sats.component.ts | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/src/app/lightning/channel/channel-box/channel-box.component.html b/frontend/src/app/lightning/channel/channel-box/channel-box.component.html index 30d1a3585..8b486eff5 100644 --- a/frontend/src/app/lightning/channel/channel-box/channel-box.component.html +++ b/frontend/src/app/lightning/channel/channel-box/channel-box.component.html @@ -19,31 +19,31 @@ Fee rate - {{ channel.fee_rate }} ppm ({{ channel.fee_rate / 10000 | number }}%) + {{ channel.fee_rate ?? '-' }} ppm ({{ channel.fee_rate / 10000 | number }}%) Base fee - + Min HTLC - + Max HTLC - + Timelock delta - + diff --git a/frontend/src/app/shared/components/sats/sats.component.html b/frontend/src/app/shared/components/sats/sats.component.html index a648cdfcb..dada43692 100644 --- a/frontend/src/app/shared/components/sats/sats.component.html +++ b/frontend/src/app/shared/components/sats/sats.component.html @@ -1,5 +1,8 @@ -‎{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis | number : digitsInfo }} -L- -tL- -t- -s-sats +{{ valueOverride }} +‎{{ addPlus && satoshis >= 0 ? '+' : '' }}{{ satoshis | number : digitsInfo }} + + L- + tL- + t- + s-sats + \ No newline at end of file diff --git a/frontend/src/app/shared/components/sats/sats.component.ts b/frontend/src/app/shared/components/sats/sats.component.ts index d9801d249..39be66ecd 100644 --- a/frontend/src/app/shared/components/sats/sats.component.ts +++ b/frontend/src/app/shared/components/sats/sats.component.ts @@ -11,6 +11,7 @@ export class SatsComponent implements OnInit { @Input() satoshis: number; @Input() digitsInfo = '1.0-0'; @Input() addPlus = false; + @Input() valueOverride: string | undefined = undefined; network = ''; stateSubscription: Subscription;