Defer transaction signing until user clicks Send#915
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
It looks like the one failing check is a CI issue with disk space too low. I'm not sure how to address that. I think the code of the PR is correct. |
|
@achow101 would you like to check this out and let me know if it looks OK? |
|
Should I push an empty commit to trigger a re-run of the CI here, or is there some other action needed? |
No action needed. |
58adbcf to
3c61ba5
Compare
3c61ba5 to
fa548a3
Compare
fa548a3 to
9b65413
Compare
|
For the rebase, I kept master's new |
|
Would anyone like to take another look at this? Any review or feedback welcomed |
johnny9
left a comment
There was a problem hiding this comment.
Double check this works with locked encrypted wallets
|
Thanks @johnny9 , I'll take a closer look this evening |
9b65413 to
39a5fed
Compare
There was a problem hiding this comment.
Moving the UnlockContext in the "Send" click flow resolved the previous issue. I think the previous UnlockContext is no longer needed.
I also see that the send confirmation dialog isn't as accurate as it was previously so should adjust what the dialog says or expose the correct fee estimated size through the model.
39a5fed to
6a999c2
Compare
|
@johnny9 I think I've fixed it correctly; I tested locally (built the gui and tested manually) and it seems like the issues are resolved. Could you test it again to confirm, and take a look at the changes to see if there are any mistakes or problems you can see? |
6a999c2 to
5b79f27
Compare
|
Thanks for the additional feedback; I've made the changes and I tested locally, I think it is all correct. Please check it out for me and see if you find any other errors or problems with it. |
|
Just checking in; anything further I can do here to get this ready for merge? |
|
According to https://btctranscripts.com/bitcoin-core-dev-tech/2026-05/qml-planning and https://btctranscripts.com/bitcoin-core-dev-tech/2026-05/qml-update, there seems to be momentum toward QML, so review in the legacy gui is reduced for now? |
This fixes issue #30070 where creating unsigned PSBTs from the GUI would fail because the transaction was already signed during preparation, causing legacy inputs to have non-empty scriptSig fields. The fix defers signing until the user explicitly clicks 'Send', allowing truly unsigned PSBTs to be created while still supporting fee calculation.
5b79f27 to
320db33
Compare
|
Rebased onto current master (4b91316). Updated for the current
Tested with Re QML: agreed there's momentum toward a QML replacement, but this is a small fix for the GUI we still ship today (#30070); I don't think that direction makes this redundant in the meantime. |
|
CI on the latest push is mostly failing at "Restore caches" with warpbuilds/cache/restore@v1 not allowed on this repo — could that be from the rebased master CI workflow rather than the patch itself, or did I miss something I should have done? |
Should work now. |
Fixes #30070
When creating an unsigned PSBT from the GUI, the transaction was already signed during preparation, causing legacy inputs to have non-empty scriptSig fields. The PSBT parser then rejects them.
This defers signing until the user clicks "Send" instead of signing during preparation. Fee calculation still works since transactions can be created without signing.
Follows the approach suggested by @achow101 in the issue comments.