-
Notifications
You must be signed in to change notification settings - Fork 6
Fix bug with marking cashu send quote as pending #619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jbojcic1
merged 1 commit into
master
from
fix-bug-when-trying-to-pay-already-paid-ln-invoice
Sep 7, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the reason why the app would crash when you would try to pay already paid invoice. I don't remeber why I added this here but doesn't make sense because we also have regular onPending handler. It also doesn't make sense to mix it with initiate mutation because intiaite could pass and this fail and then you have retries of initiate too.
I played with sends and all still seems to be working fine so seems safe to remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might have been for when paying an invoice from the same mint. It seems to work with this change, but I notice after the send completes then after a couple seconds this error shows up... maybe after a retry or something
I noticed this was a problem when working on #622 because I tried to add polling for send quotes as well, but if the melt quote is updated to PAID before we poll the PENDING quote, then we get this error that the send-quote must be pending to complete because we never saw the pending state
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested same mint payments after making this change. I also had in memory that those are the reason why we introduced this but then I saw they still work after this change. I noticed this exact thing and debugged it and I don't think it was caused by this but by the fact that mint sends two paid messages.
Was thinking that we will resolve that too with proper background task handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to be extra safe we can change our code to allow completing from unpaid state too. I think we should do that anyway because you could close the app after triggering the send before the pending message is received. then when you open it later you would get only paid message