Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Commit d236bdd

Browse files
committed
fix(lightning): Fix type errors
1 parent 117794e commit d236bdd

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/screens/Settings/Lightning/Channels.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { SettingsScreenProps } from '../../../navigation/types';
6969
/**
7070
* Convert pending (non-channel) blocktank orders to (fake) channels.
7171
* @param {IGetOrderResponse[]} orders
72-
* @param {nodeKey} string
72+
* @param {string} nodeKey
7373
*/
7474
const getPendingBlocktankChannels = (
7575
orders: IGetOrderResponse[],
@@ -82,7 +82,7 @@ const getPendingBlocktankChannels = (
8282
const failedOrders: TChannel[] = [];
8383

8484
orders.forEach((order) => {
85-
const fakeChannel = {
85+
const fakeChannel: TChannel = {
8686
channel_id: order._id,
8787
is_public: false,
8888
is_usable: false,
@@ -92,11 +92,14 @@ const getPendingBlocktankChannels = (
9292
counterparty_node_id: nodeKey,
9393
funding_txid: order.channel_open_tx?.transaction_id,
9494
// channel_type: string,
95-
user_channel_id: 0,
95+
user_channel_id: '0',
9696
// short_channel_id: number,
9797
inbound_capacity_sat: order.local_balance,
9898
outbound_capacity_sat: order.remote_balance,
9999
channel_value_satoshis: order.local_balance + order.remote_balance,
100+
short_channel_id: order._id,
101+
config_forwarding_fee_base_msat: 0,
102+
config_forwarding_fee_proportional_millionths: 0,
100103
};
101104

102105
if ([0, 100, 150, 200].includes(order.state)) {

src/utils/lightning/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import lm, {
1111
TAccount,
1212
TAccountBackup,
1313
TChannel,
14-
TChannelManagerPayment,
14+
TChannelManagerClaim,
1515
TChannelManagerPaymentSent,
1616
TCloseChannelReq,
1717
TCreatePaymentReq,
@@ -279,7 +279,7 @@ export const handleLightningPaymentSubscription = async ({
279279
selectedWallet,
280280
selectedNetwork,
281281
}: {
282-
payment: TChannelManagerPayment;
282+
payment: TChannelManagerClaim;
283283
selectedWallet?: TWalletName;
284284
selectedNetwork?: TAvailableNetworks;
285285
}): Promise<void> => {
@@ -346,7 +346,7 @@ export const subscribeToLightningPayments = ({
346346
if (!paymentSubscription) {
347347
paymentSubscription = ldk.onEvent(
348348
EEventTypes.channel_manager_payment_claimed,
349-
(res: TChannelManagerPayment) => {
349+
(res: TChannelManagerClaim) => {
350350
handleLightningPaymentSubscription({
351351
payment: res,
352352
selectedNetwork,

0 commit comments

Comments
 (0)