Import json topology

This commit is contained in:
nymkappa
2022-08-18 10:59:03 +02:00
parent c37b4cadb1
commit 57e0980134
3 changed files with 66 additions and 31 deletions

View File

@@ -207,6 +207,10 @@ export class Common {
/** Decodes a channel id returned by lnd as uint64 to a short channel id */
static channelIntegerIdToShortId(id: string): string {
if (id.indexOf('/') !== -1) {
id = id.slice(0, -2);
}
if (id.indexOf('x') !== -1) { // Already a short id
return id;
}