Implements #16954 for the current functionality + #16944 (gui: create PSBT with watch-only wallet
). This PR splits the send screen into three tabs, like a wizard.
This frees up UI real estate where we can add support for PSBT, hardware wallets and education.
I renamed SendCoinsDialog
to SendCompose
and SendConfirmationDialog
to SendSign
for clarity, which ended up (trivially) touching lots of src/qt/locale/bitcoin_##.ts
files. This is contained in two move-only commits.
Tab 1: Draft
Same as the current send screen: enter destination, do coin selection, set fee etc. This can be split further in future PRs for a less cluttered experience, e.g. one tab for coin selection (if enabled), one for destination(s) and one for fees. Having a separate tab for fees also provides an entry point for RBF, which currently doesn’t let the user pick an amount.
Tab 2: Sign
This asks to unlock the wallet if needed.
Display transaction details like the current popup does.
Edit jumps back to Draft. Send jumps to Finish, unless something goes wrong.
Bump fee jumps straight to this tab:
For watch-only wallets it displays the same text as #16944.
Tab 3: Finish
This is where the actual broadcast takes place, or where the PSBT is copied to the clipboard. In a followup we can add support for saving the PSBT to disk, or for copying a signed transaction hex to clipboard if the user wants to broadcast that elsewhere.
Bump fee shows both the previous and new transaction index:
The manual “Show” button has the nice side-effect of fixing #16875 / #16876 in two out of three places.
Todo:
- clean up WalletModelTransaction and CoinControl object passing mess
- restore test
Followups:
- add PSBT export to Sign tab (extract from gwillen’s branch https://github.com/gwillen/bitcoin/tree/feature-offline-v2, i.e. redo #16944)
- add Load PSBT menu option, jump to Broadcast tab if complete, otherwise to Sign tab
- list connected hardware wallets in Sign tab (redo #16549
- split fee selection into its own tab
- allow custom RBF amounts: bump fee should jump to fee selection tab