[qt] Multiwallet support for GUI (Core PR12610)
Original commit messages below:
Merge #12610: Multiwallet for the GUI
779c5f984 Qt: hide RPCConsole wallet selector when no wallets are present (Jonas Schnelli)
dc6f150f3 Qt: show wallet name in request dlg in case of multiwallet (Jonas Schnelli)
4826ca4b8 Qt: show wallet name in send confirmation dlg in case of multiwallet (Jonas Schnelli)
cfa4133ce GUI: RPCConsole: Log wallet changes (Luke Dashjr)
b6d04fc7c Qt: Get wallet name from WalletModel rather than passing it around (Luke Dashjr)
12d8d2681 Qt: When multiple wallets are used, include in notifications the name (Jonas Schnelli)
d1ec34a76 Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at all until needed (Luke Dashjr)
d49cc70e6 Qt: Add wallet selector to debug console (Jonas Schnelli)
d558f44c5 Bugfix: RPC: Add missing UnregisterHTTPHandler for /wallet/ (Luke Dashjr)
85d531971 Qt: Ensure UI updates only come from the currently selected walletView (Luke Dashjr)
e449f9a9e Qt: Add a combobox to toolbar to select from multiple wallets (Luke Dashjr)
3dba3c3ac Qt: Load all wallets into WalletModels (Luke Dashjr)
Pull request description:
This is an overhaul of #11383 (plus some additions). It avoids unnecessary coupling of httpserver/jsonrpc and the wallet as well as it avoids pointer pure passing (and pointer deletion) of `CWallet` (plus other minor design changes). Additionally it adds the wallet name to the sendconfirmation and request dialog (in case multiwallet is active)
Includes PR12795, since PR12610 introduced a bug:
Do not truncate .dat extension for wallets in gui
Co-authored-by: Jason B. Cox <firstname.lastname@example.org>
ninja check && ninja check-functional
./src/qt/bitcoin-qt -testnet -wallet=wallet1 -wallet=wallet2
Verify the following:
- Visually verify that the wallet dropdown exists in the upper right-hand corner.
- Selecting a wallet from the dropdown displays the transactions only associated with that wallet.
- Requesting payment on a specified wallet generates an address for that wallet.
- Visually verify that Debug window now has a dropdown containing both wallet options.
- Selecting a particular wallet from the Debug dropdown and trying RPC commands only provides output relevant to the selected wallet (I used transaction IDs only known to one of the wallets to verify).
Reviewers: deadalnix, schancel, #bitcoin_abc, Fabien
Reviewed By: deadalnix, #bitcoin_abc, Fabien
Subscribers: Fabien, teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1979