Skip to content

Commit

Permalink
fix: update Slashpay config on LN channel open/close event
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed Jul 11, 2024
1 parent 87d8404 commit a80bb06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/lightning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ export const subscribeToLightningPayments = ({
EEventTypes.new_channel,
async (res: TChannelUpdate) => {
await refreshLdk({ selectedWallet, selectedNetwork });
updateSlashPayConfig({ selectedWallet, selectedNetwork });

const openChannels = getOpenChannels();
const closedChannels = getClosedChannels();
Expand Down Expand Up @@ -535,6 +536,7 @@ export const subscribeToLightningPayments = ({
// counterparty force closed the channel
showBottomSheet('connectionClosed');
}
updateSlashPayConfig({ selectedWallet, selectedNetwork });
syncLedger(); // TChannelManagerChannelClosed is different from TChannelMonitor
},
);
Expand Down

0 comments on commit a80bb06

Please sign in to comment.