Skip to content

Commit 234e237

Browse files
authored
fix: bug toast
1 parent c6f12c9 commit 234e237

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

LDKNodeMonday/Service/Lightning Service/LightningNodeService.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,14 @@ extension LightningNodeService {
351351
Task {
352352
while true {
353353
let event = await ldkNode.nextEventAsync()
354+
// Ensure event is handled before posting notification
355+
if event != nil {
356+
try? ldkNode.eventHandled()
357+
}
354358
NotificationCenter.default.post(
355359
name: .ldkEventReceived,
356360
object: event
357361
)
358-
try? ldkNode.eventHandled()
359362
}
360363
}
361364
}

0 commit comments

Comments
 (0)