From 4201c97bc31489c44a4320d07470b124d5c936eb Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 28 Nov 2024 11:36:57 +0200 Subject: [PATCH] tests: added outputSpendingFee to test fees --- example/ldk/index.ts | 1 + example/tests/eclair.ts | 1 + example/tests/unit.ts | 2 ++ example/tests/utils/test-profile.ts | 1 + lib/src/lightning-manager.ts | 1 - 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/example/ldk/index.ts b/example/ldk/index.ts index 544bb221..019f5341 100644 --- a/example/ldk/index.ts +++ b/example/ldk/index.ts @@ -134,6 +134,7 @@ export const setupLdk = async ( maxAllowedNonAnchorChannelRemoteFee: 10, onChainSweep: 10, minAllowedNonAnchorChannelRemoteFee: 10, + outputSpendingFee: 10, }), getTransactionData, getTransactionPosition, diff --git a/example/tests/eclair.ts b/example/tests/eclair.ts index ab356c15..ca7a6ea0 100644 --- a/example/tests/eclair.ts +++ b/example/tests/eclair.ts @@ -112,6 +112,7 @@ describe('Eclair', function () { anchorChannelFee: 10, nonAnchorChannelFee: 20, channelCloseMinimum: 5, + outputSpendingFee: 10, }); }, }); diff --git a/example/tests/unit.ts b/example/tests/unit.ts index 87c5a140..d01c85aa 100644 --- a/example/tests/unit.ts +++ b/example/tests/unit.ts @@ -71,6 +71,7 @@ describe('Unit', function () { minAllowedAnchorChannelRemoteFee: 5, minAllowedNonAnchorChannelRemoteFee: 5, onChainSweep: 5, + outputSpendingFee: 5, }); }, getTransactionData: async () => ({ @@ -214,6 +215,7 @@ describe('Unit', function () { minAllowedAnchorChannelRemoteFee: 5, minAllowedNonAnchorChannelRemoteFee: 5, onChainSweep: 5, + outputSpendingFee: 5, }); }, getTransactionData: async () => ({ diff --git a/example/tests/utils/test-profile.ts b/example/tests/utils/test-profile.ts index 4f0cc83a..42babd87 100644 --- a/example/tests/utils/test-profile.ts +++ b/example/tests/utils/test-profile.ts @@ -82,6 +82,7 @@ export default class TestProfile { anchorChannelFee: 2, nonAnchorChannelFee: 3, channelCloseMinimum: 1, + outputSpendingFee: 5, }), getTransactionData: this.getTransactionData, getTransactionPosition: this.getTransactionPosition, diff --git a/lib/src/lightning-manager.ts b/lib/src/lightning-manager.ts index 564718c8..1396acb0 100644 --- a/lib/src/lightning-manager.ts +++ b/lib/src/lightning-manager.ts @@ -2466,7 +2466,6 @@ class LightningManager { EEventTypes.channel_manager_channel_closed, (eventRes: TChannelManagerChannelClosed) => { if (eventRes.channel_id === res.value) { - clearTimeout(timeout); if (eventRes.peer_message) { resolve(err(eventRes.peer_message));