From f7d475aa752dcb6c6b672e2cf5ce59230e925d23 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 22 Aug 2022 09:07:09 +0200 Subject: [PATCH 1/4] Remove useless api call in channel page --- .../nodes-channels-map/nodes-channels-map.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts index 296bb917c..182b98a56 100644 --- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts +++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts @@ -74,7 +74,7 @@ export class NodesChannelsMap implements OnInit { switchMap((params: ParamMap) => { return zip( this.assetsService.getWorldMapJson$, - this.apiService.getChannelsGeo$(params.get('public_key') ?? undefined), + this.style !== 'channelpage' ? this.apiService.getChannelsGeo$(params.get('public_key') ?? undefined) : [''], [params.get('public_key') ?? undefined] ).pipe(tap((data) => { registerMap('world', data[0]); From 2a26d532df901ae489c6323fb06c27a602130e3c Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 22 Aug 2022 09:17:23 +0200 Subject: [PATCH 2/4] Add "Lightning node" and "Lighning channel" page title --- frontend/src/app/lightning/channel/channel.component.html | 1 + frontend/src/app/lightning/node/node.component.html | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/app/lightning/channel/channel.component.html b/frontend/src/app/lightning/channel/channel.component.html index 646094619..65866273d 100644 --- a/frontend/src/app/lightning/channel/channel.component.html +++ b/frontend/src/app/lightning/channel/channel.component.html @@ -1,4 +1,5 @@
+
Lightning channel

{{ channel.short_id }}

diff --git a/frontend/src/app/lightning/node/node.component.html b/frontend/src/app/lightning/node/node.component.html index e2e500ac5..e90b7d5ef 100644 --- a/frontend/src/app/lightning/node/node.component.html +++ b/frontend/src/app/lightning/node/node.component.html @@ -1,4 +1,5 @@
+
Lightning node

{{ node.alias }}

From 9af2d478c8de254b8ae28d7141c6656db66eb183 Mon Sep 17 00:00:00 2001 From: softsimon Date: Mon, 22 Aug 2022 18:10:09 +0400 Subject: [PATCH 3/4] Fix network regex matching --- frontend/src/app/services/state.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts index 466837f98..14d220fa1 100644 --- a/frontend/src/app/services/state.service.ts +++ b/frontend/src/app/services/state.service.ts @@ -153,7 +153,7 @@ export class StateService { if (this.env.BASE_MODULE !== 'mempool' && this.env.BASE_MODULE !== 'liquid') { return; } - const networkMatches = url.match(/\/(bisq|testnet|liquidtestnet|liquid|signet)/); + const networkMatches = url.match(/^\/(bisq|testnet|liquidtestnet|liquid|signet)/); switch (networkMatches && networkMatches[1]) { case 'liquid': if (this.network !== 'liquid') { From 63404edeec9908bcd03a4bea7c3cd92e47e7bc53 Mon Sep 17 00:00:00 2001 From: softsimon Date: Sat, 20 Aug 2022 15:56:11 +0400 Subject: [PATCH 4/4] Fix for closing missing closing reason in channels list --- backend/src/api/explorer/channels.api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/api/explorer/channels.api.ts b/backend/src/api/explorer/channels.api.ts index b88b21ca3..408356639 100644 --- a/backend/src/api/explorer/channels.api.ts +++ b/backend/src/api/explorer/channels.api.ts @@ -225,7 +225,7 @@ class ChannelsApi { let query = ` SELECT COALESCE(node2.alias, SUBSTRING(node2_public_key, 0, 20)) AS alias, COALESCE(node2.public_key, node2_public_key) AS public_key, channels.status, channels.node1_fee_rate, - channels.capacity, channels.short_id, channels.id + channels.capacity, channels.short_id, channels.id, channels.closing_reason FROM channels LEFT JOIN nodes AS node2 ON node2.public_key = channels.node2_public_key WHERE node1_public_key = ? AND channels.status ${channelStatusFilter} @@ -236,7 +236,7 @@ class ChannelsApi { query = ` SELECT COALESCE(node1.alias, SUBSTRING(node1_public_key, 0, 20)) AS alias, COALESCE(node1.public_key, node1_public_key) AS public_key, channels.status, channels.node2_fee_rate, - channels.capacity, channels.short_id, channels.id + channels.capacity, channels.short_id, channels.id, channels.closing_reason FROM channels LEFT JOIN nodes AS node1 ON node1.public_key = channels.node1_public_key WHERE node2_public_key = ? AND channels.status ${channelStatusFilter} @@ -254,6 +254,7 @@ class ChannelsApi { const activeChannelsStats: any = await nodesApi.$getActiveChannelsStats(row.public_key); channels.push({ status: row.status, + closing_reason: row.closing_reason, capacity: row.capacity ?? 0, short_id: row.short_id, id: row.id,