From 2104570889edc43365b120db4d1c6b88af4f97b1 Mon Sep 17 00:00:00 2001
From: softsimon
Date: Tue, 23 Aug 2022 17:05:23 +0400
Subject: [PATCH 01/17] Tooling: Eslint force triple equals
---
backend/.eslintrc | 3 ++-
frontend/.eslintrc | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/.eslintrc b/backend/.eslintrc
index 3029ebab6..1b2889e50 100644
--- a/backend/.eslintrc
+++ b/backend/.eslintrc
@@ -31,6 +31,7 @@
"prefer-const": 1,
"prefer-rest-params": 1,
"quotes": [1, "single", { "allowTemplateLiterals": true }],
- "semi": 1
+ "semi": 1,
+ "eqeqeq": 1
}
}
diff --git a/frontend/.eslintrc b/frontend/.eslintrc
index 4dbcf98d9..9347a2050 100644
--- a/frontend/.eslintrc
+++ b/frontend/.eslintrc
@@ -32,6 +32,7 @@
"prefer-const": 1,
"prefer-rest-params": 1,
"quotes": [1, "single", { "allowTemplateLiterals": true }],
- "semi": 1
+ "semi": 1,
+ "eqeqeq": 1
}
}
From a2dd0baaf6025719dcff9c3753e60d73976fa0be Mon Sep 17 00:00:00 2001
From: Felipe Knorr Kuhn <100320+knorrium@users.noreply.github.com>
Date: Sat, 3 Sep 2022 09:23:55 -0700
Subject: [PATCH 02/17] Fix sed command for the pools json urls
---
docker/backend/start.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docker/backend/start.sh b/docker/backend/start.sh
index 8e6a34013..795b821fc 100644
--- a/docker/backend/start.sh
+++ b/docker/backend/start.sh
@@ -132,8 +132,8 @@ sed -i "s!__MEMPOOL_USER_AGENT__!${__MEMPOOL_USER_AGENT__}!g" mempool-config.jso
sed -i "s/__MEMPOOL_STDOUT_LOG_MIN_PRIORITY__/${__MEMPOOL_STDOUT_LOG_MIN_PRIORITY__}/g" mempool-config.json
sed -i "s/__MEMPOOL_INDEXING_BLOCKS_AMOUNT__/${__MEMPOOL_INDEXING_BLOCKS_AMOUNT__}/g" mempool-config.json
sed -i "s/__MEMPOOL_AUTOMATIC_BLOCK_REINDEXING__/${__MEMPOOL_AUTOMATIC_BLOCK_REINDEXING__}/g" mempool-config.json
-sed -i "s!__MEMPOOL_POOLS_JSON_URL__!${__MEMPOOL_POOLS_JSON_URL__}/g" mempool-config.json
-sed -i "s!__MEMPOOL_POOLS_JSON_TREE_URL__!${__MEMPOOL_POOLS_JSON_TREE_URL__}/g" mempool-config.json
+sed -i "s!__MEMPOOL_POOLS_JSON_URL__!${__MEMPOOL_POOLS_JSON_URL__}!g" mempool-config.json
+sed -i "s!__MEMPOOL_POOLS_JSON_TREE_URL__!${__MEMPOOL_POOLS_JSON_TREE_URL__}!g" mempool-config.json
sed -i "s/__CORE_RPC_HOST__/${__CORE_RPC_HOST__}/g" mempool-config.json
sed -i "s/__CORE_RPC_PORT__/${__CORE_RPC_PORT__}/g" mempool-config.json
From dac3a43c1bd0343f7a5b949736797458b3dda2f3 Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Sun, 4 Sep 2022 09:23:49 +0200
Subject: [PATCH 03/17] When using clightning, use listchannels.delay as
cltv_delta
---
backend/src/api/lightning/clightning/clightning-convert.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/api/lightning/clightning/clightning-convert.ts b/backend/src/api/lightning/clightning/clightning-convert.ts
index 8b055832e..121fb20ea 100644
--- a/backend/src/api/lightning/clightning/clightning-convert.ts
+++ b/backend/src/api/lightning/clightning/clightning-convert.ts
@@ -124,7 +124,7 @@ async function buildIncompleteChannel(clChannel: any): Promise
Date: Tue, 6 Sep 2022 10:51:14 +0200
Subject: [PATCH 04/17] Show that we don't know where a node is because it's
running on tor
---
.../src/app/lightning/node/node.component.html | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/frontend/src/app/lightning/node/node.component.html b/frontend/src/app/lightning/node/node.component.html
index f0be2fe89..9c2825a2b 100644
--- a/frontend/src/app/lightning/node/node.component.html
+++ b/frontend/src/app/lightning/node/node.component.html
@@ -44,11 +44,14 @@
-
+
Location |
-
+ |
|
+
+ Unknown
+ |
@@ -75,13 +78,16 @@
{{ node.color }}
-
+
ISP |
-
+ |
{{ node.as_organization }} [ASN {{node.as_number}}]
|
+
+ Running on Tor
+ |
From 2d52dcd867028b352d25d710dee916e8be0bb823 Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Tue, 6 Sep 2022 16:43:22 +0200
Subject: [PATCH 05/17] Fix wrong skeleton labels
---
.../nodes-per-isp-chart.component.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html
index ef1c71efd..093a8ad1a 100644
--- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html
+++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.html
@@ -10,14 +10,14 @@
-
Unknown capacity
+
Unknown capacity
-
Tor capacity
+
Tor capacity
@@ -80,19 +80,19 @@
-
Tagged ISPs
+
Clearnet capacity
-
Tagged capacity
+
Unknown capacity
-
Tagged nodes
+
Tor capacity
From b608b66823ec551a490046318214721593cb2d5f Mon Sep 17 00:00:00 2001
From: Mononaut
Date: Tue, 6 Sep 2022 17:03:41 +0000
Subject: [PATCH 06/17] Fix tx diagram for zero value transactions
---
.../tx-bowtie-graph.component.ts | 38 +++++++++++--------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/frontend/src/app/components/tx-bowtie-graph/tx-bowtie-graph.component.ts b/frontend/src/app/components/tx-bowtie-graph/tx-bowtie-graph.component.ts
index 427a282a9..e45acc26c 100644
--- a/frontend/src/app/components/tx-bowtie-graph/tx-bowtie-graph.component.ts
+++ b/frontend/src/app/components/tx-bowtie-graph/tx-bowtie-graph.component.ts
@@ -87,29 +87,37 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
// assume confidential inputs/outputs have the same average value as the known ones
const adjustedTotalInput = totalInput + ((totalInput / knownInputCount) * confidentialInputCount);
const adjustedTotalOutput = totalOutput + ((totalOutput / knownOutputCount) * confidentialOutputCount);
- return Math.max(adjustedTotalInput, adjustedTotalOutput) || 1;
+ return Math.max(adjustedTotalInput, adjustedTotalOutput);
} else {
// otherwise knowing the actual total of one side suffices
- return Math.max(totalInput, totalOutput) || 1;
+ return Math.max(totalInput, totalOutput);
}
}
}
initLines(side: 'in' | 'out', xputs: { type: string, value: number | void }[], total: number, maxVisibleStrands: number): SvgLine[] {
- const lines = [];
- let unknownCount = 0;
- let unknownTotal = total == null ? this.combinedWeight : total;
- xputs.forEach(put => {
- if (put.value == null) {
- unknownCount++;
- } else {
- unknownTotal -= put.value as number;
- }
- });
- const unknownShare = unknownTotal / unknownCount;
+ if (!total) {
+ const weights = xputs.map((put): number => this.combinedWeight / xputs.length);
+ return this.linesFromWeights(side, xputs, weights, maxVisibleStrands);
+ } else {
+ let unknownCount = 0;
+ let unknownTotal = total;
+ xputs.forEach(put => {
+ if (put.value == null) {
+ unknownCount++;
+ } else {
+ unknownTotal -= put.value as number;
+ }
+ });
+ const unknownShare = unknownTotal / unknownCount;
+ // conceptual weights
+ const weights = xputs.map((put): number => this.combinedWeight * (put.value == null ? unknownShare : put.value as number) / total);
+ return this.linesFromWeights(side, xputs, weights, maxVisibleStrands);
+ }
+ }
- // conceptual weights
- const weights = xputs.map((put): number => this.combinedWeight * (put.value == null ? unknownShare : put.value as number) / total);
+ linesFromWeights(side: 'in' | 'out', xputs: { type: string, value: number | void }[], weights: number[], maxVisibleStrands: number) {
+ const lines = [];
// actual displayed line thicknesses
const minWeights = weights.map((w) => Math.max(this.minWeight - 1, w) + 1);
const visibleStrands = Math.min(maxVisibleStrands, xputs.length);
From d9483dbd7a454a9465aaf1b87cd48d84fd368d61 Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Wed, 7 Sep 2022 10:10:25 +0200
Subject: [PATCH 07/17] Update ISP pie chart colors
---
.../nodes-per-isp-chart/nodes-per-isp-chart.component.ts | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts
index c60620f61..4f7656526 100644
--- a/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts
+++ b/frontend/src/app/lightning/nodes-per-isp-chart/nodes-per-isp-chart.component.ts
@@ -132,9 +132,6 @@ export class NodesPerISPChartComponent implements OnInit {
return;
}
data.push({
- itemStyle: {
- color: isp[0] === null ? '#7D4698' : undefined,
- },
value: this.sortBy === 'capacity' ? isp[7] : isp[6],
name: isp[1].replace('&', '') + (isMobile() || this.widget ? `` : ` (${this.sortBy === 'capacity' ? isp[7] : isp[6]}%)`),
label: {
@@ -204,7 +201,7 @@ export class NodesPerISPChartComponent implements OnInit {
}
this.chartOptions = {
- color: chartColors.slice(3),
+ color: chartColors.filter((color) => color != '#5E35B1'), // Remove color that looks like Tor
tooltip: {
trigger: 'item',
textStyle: {
From 1a2c0b7843044e53d4f2acab4666d2f132641e19 Mon Sep 17 00:00:00 2001
From: nymkappa
Date: Wed, 7 Sep 2022 15:38:48 +0200
Subject: [PATCH 08/17] Lightning dashboard -> Lightning network
---
.../lightning-dashboard/lightning-dashboard.component.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts b/frontend/src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts
index d601606fd..063e2c6a5 100644
--- a/frontend/src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts
+++ b/frontend/src/app/lightning/lightning-dashboard/lightning-dashboard.component.ts
@@ -21,7 +21,7 @@ export class LightningDashboardComponent implements OnInit {
) { }
ngOnInit(): void {
- this.seoService.setTitle($localize`Lightning Dashboard`);
+ this.seoService.setTitle($localize`Lightning Network`);
this.nodesRanking$ = this.lightningApiService.getNodesRanking$().pipe(share());
this.statistics$ = this.lightningApiService.getLatestStatistics$().pipe(share());
From 2d2b7d3a9fba1922b776aefa86e4b673319e3b56 Mon Sep 17 00:00:00 2001
From: wiz
Date: Fri, 9 Sep 2022 19:11:55 +0900
Subject: [PATCH 09/17] Add more Community Integrations on About page
---
.../app/components/about/about.component.html | 36 +++++++++---------
.../app/components/about/about.component.scss | 4 +-
.../src/resources/profile/btcpayserver.svg | 1 +
frontend/src/resources/profile/electrum.jpg | Bin 19839 -> 0 bytes
frontend/src/resources/profile/electrum.png | Bin 0 -> 174386 bytes
frontend/src/resources/profile/lnbits.svg | 1 +
6 files changed, 22 insertions(+), 20 deletions(-)
create mode 100644 frontend/src/resources/profile/btcpayserver.svg
delete mode 100644 frontend/src/resources/profile/electrum.jpg
create mode 100644 frontend/src/resources/profile/electrum.png
create mode 100644 frontend/src/resources/profile/lnbits.svg
diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html
index 36d765a17..5cfb2c905 100644
--- a/frontend/src/app/components/about/about.component.html
+++ b/frontend/src/app/components/about/about.component.html
@@ -187,8 +187,8 @@
-