From 6336c529edcf297909142627b5f75be7ab55fe40 Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Sat, 8 Jul 2023 10:43:37 +0200 Subject: [PATCH] [lightning] show decoded features in node page --- .../app/lightning/node/node.component.html | 28 ++++++++++++++++++- .../src/app/lightning/node/node.component.ts | 7 ++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/lightning/node/node.component.html b/frontend/src/app/lightning/node/node.component.html index c3903e915..0ed1c78c9 100644 --- a/frontend/src/app/lightning/node/node.component.html +++ b/frontend/src/app/lightning/node/node.component.html @@ -118,10 +118,36 @@ Features {{ bits }} - + +
+
+
+
+
Raw bits
+ {{ node.featuresBits }} +
+
Decoded
+ + + + + + + + + + + + + +
BitNameRequired
{{ feature.bit }}{{ feature.name }}{{ feature.is_required }}
+
+
+
+
diff --git a/frontend/src/app/lightning/node/node.component.ts b/frontend/src/app/lightning/node/node.component.ts index 47f65007f..719136d79 100644 --- a/frontend/src/app/lightning/node/node.component.ts +++ b/frontend/src/app/lightning/node/node.component.ts @@ -37,7 +37,7 @@ export class NodeComponent implements OnInit { liquidityAd: ILiquidityAd; tlvRecords: CustomRecord[]; avgChannelDistance$: Observable; - + showFeatures = false; kmToMiles = kmToMiles; constructor( @@ -164,4 +164,9 @@ export class NodeComponent implements OnInit { onLoadingEvent(e) { this.channelListLoading = e; } + + toggleFeatures() { + this.showFeatures = !this.showFeatures; + return false; + } }