tweak lightning unfurl layouts

This commit is contained in:
Mononaut
2022-08-11 17:42:29 +00:00
parent 390419f01b
commit e96ca277a1
5 changed files with 39 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ export class NodePreviewComponent implements OnInit {
channelsListStatus: string;
error: Error;
publicKey: string;
socketTypes: string[];
publicKeySize = 99;
@@ -50,6 +51,7 @@ export class NodePreviewComponent implements OnInit {
this.seoService.setTitle(`Node: ${node.alias}`);
const socketsObject = [];
const socketTypesMap = {};
for (const socket of node.sockets.split(',')) {
if (socket === '') {
continue;
@@ -67,8 +69,10 @@ export class NodePreviewComponent implements OnInit {
label: label,
socket: node.public_key + '@' + socket,
});
socketTypesMap[label] = true
}
node.socketsObject = socketsObject;
this.socketTypes = Object.keys(socketTypesMap);
node.avgCapacity = node.capacity / Math.max(1, node.active_channel_count);
this.openGraphService.waitOver('node-data');