diff --git a/src/app/partials/node-connections/node-connections.component.ts b/src/app/partials/node-connections/node-connections.component.ts index a75aae9..a3759e3 100644 --- a/src/app/partials/node-connections/node-connections.component.ts +++ b/src/app/partials/node-connections/node-connections.component.ts @@ -77,9 +77,8 @@ export class NodeConnectionsComponent implements OnInit { buildNodes() { for (let node of this.nodeOwners) { - let data = this.lnData - .getNodeInfo(node.pub_key) - .subscribe((data: NodeInfo) => { + let data = this.lnData.getNodeInfo(node.pub_key).subscribe({ + next: (data: NodeInfo) => { let label; //if (this.viewMode == 'node') { @@ -114,7 +113,11 @@ export class NodeConnectionsComponent implements OnInit { continue channelloop; } } - }); + }, + error: (err) => { + console.log('Error', err); + }, + }); } } } diff --git a/src/app/partials/participant-table/participant-table.component.html b/src/app/partials/participant-table/participant-table.component.html index 799341d..841eb46 100644 --- a/src/app/partials/participant-table/participant-table.component.html +++ b/src/app/partials/participant-table/participant-table.component.html @@ -12,7 +12,7 @@ - + Node policy {{title}}
@@ -27,22 +27,22 @@ {{ item[0].nodename }} {{ item[1].nodename }}
- +
{{ item[3][0].fee_base_msat }}
- +
{{ item[3][0].fee_rate_milli_msat }}
- +
{{ item[3][1].fee_base_msat }}
- +
{{ item[3][1].fee_rate_milli_msat }}
diff --git a/src/app/partials/participant-table/participant-table.component.scss b/src/app/partials/participant-table/participant-table.component.scss index ee2fbf9..cfe8f25 100644 --- a/src/app/partials/participant-table/participant-table.component.scss +++ b/src/app/partials/participant-table/participant-table.component.scss @@ -1 +1,14 @@ -@import "~highlight.js/styles/github-dark.css"; \ No newline at end of file +@import "~highlight.js/styles/github-dark.css"; + +.error { + + th { + border-left: 5px dotted #f00; + } + + +} + +td.error { + background: #f00; +} \ No newline at end of file diff --git a/src/app/services/ring-data.service.ts b/src/app/services/ring-data.service.ts index 8079af3..8d471aa 100644 --- a/src/app/services/ring-data.service.ts +++ b/src/app/services/ring-data.service.ts @@ -67,17 +67,24 @@ export class RingDataService { let ring: IRing = []; for (const [i, node] of this.nodeOwners.entries()) { let nextIndex = (i + 1) % this.nodeOwners.length; - const nodeInfo = Object.assign( - new NodeInfo(), - await this.lnData.getNodeInfoAsync(this.nodeOwners[i].pub_key) - ); - let channel = nodeInfo.hasChannelWith(this.nodeOwners[nextIndex].pub_key); + + let nodeInfo, channel; + try { + nodeInfo = Object.assign( + new NodeInfo(), + await this.lnData.getNodeInfoAsync(this.nodeOwners[i].pub_key) + ); + } catch {} + + if (nodeInfo) { + channel = nodeInfo.hasChannelWith(this.nodeOwners[nextIndex].pub_key); + } ring.push([ Object.assign(new NodeOwner(), this.nodeOwners[i]), Object.assign(new NodeOwner(), this.nodeOwners[nextIndex]), channel, - channel + channel && nodeInfo ? nodeInfo.getChannelPolicies( this.nodeOwners[nextIndex].pub_key, channel