Skip to content

Commit

Permalink
tsc: fix closeChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Oct 18, 2024
1 parent 81a2d90 commit d569dde
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
10 changes: 5 additions & 5 deletions stores/ChannelsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,11 @@ export default class ChannelsStore {

@action
public closeChannel = async (
channelPoint?: CloseChannelRequest | null,
channelId?: string | null,
satPerVbyte?: string | null,
forceClose?: boolean | string | null,
deliveryAddress?: string | null
channelPoint?: CloseChannelRequest,
channelId?: string,
satPerVbyte?: string,
forceClose?: boolean | string,
deliveryAddress?: string
) => {
this.closeChannelErr = null;
this.closingChannel = true;
Expand Down
12 changes: 7 additions & 5 deletions views/Channels/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ export default class ChannelView extends React.Component<
}

const streamingCall = await ChannelsStore.closeChannel(
channelPoint ? { funding_txid_str, output_index } : null,
channelId ? channelId : null,
satPerVbyte ? satPerVbyte : null,
forceClose,
deliveryAddress ? deliveryAddress : null
funding_txid_str && output_index
? { funding_txid_str, output_index: output_index }
: undefined,
channelId ? channelId : undefined,
satPerVbyte ? satPerVbyte : undefined,
forceClose || false,
deliveryAddress ? deliveryAddress : undefined
);

if (implementation === 'lightning-node-connect') {
Expand Down

0 comments on commit d569dde

Please sign in to comment.