From abb078f7ee36695f8065fa6f20dc611597839526 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Tue, 9 Aug 2022 09:21:31 +0200 Subject: [PATCH] Convert to short_id before fetching the funding tx --- backend/src/tasks/lightning/sync-tasks/funding-tx-fetcher.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/tasks/lightning/sync-tasks/funding-tx-fetcher.ts b/backend/src/tasks/lightning/sync-tasks/funding-tx-fetcher.ts index 8ca05b929..6ee50b8e9 100644 --- a/backend/src/tasks/lightning/sync-tasks/funding-tx-fetcher.ts +++ b/backend/src/tasks/lightning/sync-tasks/funding-tx-fetcher.ts @@ -1,5 +1,6 @@ import { existsSync, promises } from 'fs'; import bitcoinClient from '../../../api/bitcoin/bitcoin-client'; +import { Common } from '../../../api/common'; import config from '../../../config'; import logger from '../../../logger'; @@ -70,6 +71,10 @@ class FundingTxFetcher { } public async $fetchChannelOpenTx(channelId: string): Promise<{timestamp: number, txid: string, value: number}> { + if (channelId.indexOf('x') === -1) { + channelId = Common.channelIntegerIdToShortId(channelId); + } + if (this.fundingTxCache[channelId]) { return this.fundingTxCache[channelId]; }