HomePhabricator

Merge #13097: ui: Support wallets loaded dynamically

Description

Merge #13097: ui: Support wallets loaded dynamically

Summary:
2e7513471 fixup! ui: Support wallets loaded dynamically (João Barbosa)
0e674ba55 ui: Support wallets loaded dynamically (João Barbosa)
1c8fe0bf9 ui: Remove unnecessary variable fFirstWallet (João Barbosa)

Pull request description:

Add support in the UI for wallets loaded dynamically.

Tree-SHA512: 4016d61580b31e28c49861b1cb0e77fac5417f9676a6ce6156be28cb6059fdf3d3dd4d57dbbc22a574ad428c2a4a3702aedca596a84e644ce148e1084feb29c9

Backport of Core PR13097
https://github.com/bitcoin/bitcoin/pull/13097/

Depends on D4245
This dependency is a bug fix.

Test Plan:

make check

Create a new wallet first

./bitcoind
./bitcoin-cli createwallet "testwallet"
./bitcoin-cli -rpcwallet="testwallet" getwalletinfo
kill bitcoind

The getwalletinfo rpc should output something like this:

{
  "walletname": "testwallet",
  "walletversion": 200300,
  "balance": 0.00000000,
  "unconfirmed_balance": 0.00000000,
  "immature_balance": 0.00000000,
  "txcount": 0,
  "keypoololdest": 1570729970,
  "keypoolsize": 1000,
  "keypoolsize_hd_internal": 1000,
  "paytxfee": 0.00000000,
  "hdmasterkeyid": "e0c38684642d0301c5db7f5e2a43ea3a84764fec"
}

Open bitcoin-qt and then load the new wallet

./bitcoin-qt
Help -> Debug -> Console
loadwallet "testwallet"

In the upper left corner under the menu bar, use the drop-down menu labeled wallets to select testwallet.
In the console input:

getwalletinfo

This should output the same as above

Close the console window.
In the upper right corner of the main menu, use the drop-down menu labeled wallets to select testwallet.
The window should now display the information for testwallet.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4236

Details

Provenance
Jonas Schnelli <dev@jonasschnelli.ch>Authored on May 18 2018, 08:10
nakihitoCommitted on Oct 12 2019, 04:37
nakihitoPushed on Oct 12 2019, 04:37
Reviewer
Restricted Owners Package
Differential Revision
D4236: Merge #13097: ui: Support wallets loaded dynamically
Parents
rABCce33ec89a97f: Merge #13273: Qt/Bugfix: fix handling default wallet with no name
Branches
Unknown
Tags
Unknown