qt: disable Save button for certain multiline payment identifiers - #10930
Draft
accumulator wants to merge 2 commits into
Draft
qt: disable Save button for certain multiline payment identifiers#10930accumulator wants to merge 2 commits into
accumulator wants to merge 2 commits into
Conversation
accumulator
force-pushed
the
qt_edit_saved_invoice_fixes
branch
2 times, most recently
from
September 4, 2026 13:13
14a649c to
24ff861
Compare
we can save multiline PI's as invoice, as long as we don't enter the do_edit_invoice flow with outputs that cannot be rendered to multiline CSV. This means in these cases saving invoice should be enabled only when: 1. amount to send is non-zero (at least one of the outputs has a non-zero value), or 2. if total amount to send is zero, all outputs are addresses In case (1), we skip the do_edit_invoice flow In case (2), we can render all outputs Note: this doesn't handle existing saved invoices that violate the above constraints. Note2: this also fixes a pre-existing bug, where do_edit_invoice flow is entered for a multi-output invoice, but only the first output is put in the recipient field, ignoring the other outputs when subsequently saving/paying.
accumulator
force-pushed
the
qt_edit_saved_invoice_fixes
branch
from
September 4, 2026 14:51
24ff861 to
61fd484
Compare
accumulator
force-pushed
the
qt_edit_saved_invoice_fixes
branch
from
September 4, 2026 15:15
748a325 to
901a52c
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.
we can save multiline PI's as invoice, as long as we don't enter the
do_edit_invoiceflow with outputs that cannot be rendered to multiline CSV.This means in these cases saving invoice should be enabled only when:
In case (1), we skip the
do_edit_invoiceflowIn case (2), we can render all outputs
fixes #10132
Note: this PR doesn't handle existing saved invoices that violate the above constraints.
Note2: this also fixes another pre-existing bug, where
do_edit_invoiceflow is entered for a multi-output invoice, but only the first output is put in the recipient field, ignoring the other outputs when subsequently saving/paying.