mirror of
https://github.com/mempool/mempool.git
synced 2025-02-20 13:34:40 +01:00
Merge pull request #2468 from mempool/nymkappa/bugfix/ipv6-cln
CLN - Add brakets around ipv6
This commit is contained in:
commit
91355c0936
1 changed files with 5 additions and 1 deletions
|
@ -13,9 +13,13 @@ export function convertNode(clNode: any): ILightningApi.Node {
|
|||
features: [], // TODO parse and return clNode.feature
|
||||
pub_key: clNode.nodeid,
|
||||
addresses: clNode.addresses?.map((addr) => {
|
||||
let address = addr.address;
|
||||
if (addr.type === 'ipv6') {
|
||||
address = `[${address}]`;
|
||||
}
|
||||
return {
|
||||
network: addr.type,
|
||||
addr: `${addr.address}:${addr.port}`
|
||||
addr: `${address}:${addr.port}`
|
||||
};
|
||||
}) ?? [],
|
||||
last_update: clNode?.last_timestamp ?? 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue