Fix activity not created on send: create immediately from txid, increase LDK retries#450
Merged
ben-kaufman merged 5 commits intofeat/multiple-addresses-typesfrom Feb 20, 2026
Conversation
9c5e610 to
af5093d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sent onchain transactions sometimes never appeared in the activity list. Logs showed:
LDK timing – onchainTransactionReceived fires ~7 seconds after broadcast.
Core queue delay – handleOnchainTransactionReceived could run 5+ minutes later due to core queue congestion.
SendSuccess polling – The success sheet polls for activity for 12 attempts (5s apart) and often times out before the activity exists.
Solution
Create the sent onchain activity as soon as we have the txid from a successful send, instead of waiting for the LDK event:
Added createSentOnchainActivityFromSendResult() to ActivityService to create an OnchainActivity from the send result.
Call it from SendConfirmationView right after wallet.send() returns the txid.
When LDK later emits onchainTransactionReceived, processOnchainPayment updates this activity (e.g. confirmation status).
Increased retries from 3×300ms to 10×500ms (~4.5s total) so LDK has more time to add the payment to listPayments() before we give up.