Skip to content

Commit c106b2f

Browse files
committed
fix: update Slashpay config after refreshLdk on CJIT
1 parent 7114a47 commit c106b2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/lightning/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ export const subscribeToLightningPayments = ({
536536
EEventTypes.new_channel,
537537
async (res: TChannelUpdate) => {
538538
await updateChannelsThunk();
539-
updateSlashPayConfig({ selectedWallet, selectedNetwork });
540539

541540
const openChannels = getOpenChannels();
542541
const closedChannels = getClosedChannels();
@@ -553,10 +552,11 @@ export const subscribeToLightningPayments = ({
553552

554553
// Check if this is a CJIT Entry that needs to be added to the activity list.
555554
addCJitActivityItem(res.channel_id).then();
556-
// Refresh to update balance
557-
refreshLdk();
558555
// We need to sync the ledger because TChannelUpdate doesn't have enough data
559556
syncLedger();
557+
// Refresh to update balance
558+
await refreshLdk();
559+
updateSlashPayConfig({ selectedWallet, selectedNetwork });
560560
},
561561
);
562562
}

0 commit comments

Comments
 (0)