gui: When private key is disabled, only show watch-only balance#13966
gui: When private key is disabled, only show watch-only balance#13966laanwj merged 2 commits intobitcoin:masterfrom ken2812221:ui-disable-privkey
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
promag
left a comment
There was a problem hiding this comment.
Concept ACK. Could add before and after shots.
src/qt/overviewpage.cpp
Outdated
There was a problem hiding this comment.
nit, since there is one caller only, could remove it and below do
connect(model, &WalletModel::notifyWatchonlyChanged, [this](bool showWatchOnly) {
updateWalletLabels(showWatchOnly, !walletModel->privateKeysDisabled());
});|
With multiple wallets loaded, it may be weird to have the toggling, maybe disable instead of hiding? |
|
Concept ACK |
|
Nice! |
src/qt/overviewpage.cpp
Outdated
|
Testing fe1ff50 using the following commands (in the Debug window given that we're looking at a GUI change). Screenshots below, will review further shortly. |
|
Tested ACK fe1ff50 |
|
Concept ACK, the distinction between"spendable" and "watch-only" is confusing anyway, and a big source of scams (even if that particular scam is less likely here, though something to be aware of once #13100 is merged). The concept of watch-only might become less clear in general moving forward. @sipa does this get in the way of the direction you have in mind for the wallet refactor? |
|
@fanquake based on your image, I think some indications that private keys are disabled is probably desired? Otherwise it looks to a long-time user that indeed you own the funds and have the keys locally. |
|
I believe (didn't test) that you still see the eye icon next to transactions to indicate watch-only, but I think a regular icon in the bottom right would be better. We could get rid of the HD icon to keep visual clutter constant. |
|
Update: Now it shows watch-only eye instead of HD/non-HD wallet icon. |
| @@ -215,7 +215,7 @@ public Q_SLOTS: | |||
| @param[in] status current hd enabled status | |||
meshcollider
left a comment
There was a problem hiding this comment.
Tested ACK 82d6c5a
As an alternative which I think might be clearer, what about including the eye next to the Balances title like this?
micro-nit: typo in first commit message priveate -> private
| labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); | ||
| labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>")); | ||
| labelWalletHDStatusIcon->setPixmap(platformStyle->SingleColorIcon(privkeyDisabled ? ":/icons/eye" : hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE)); | ||
| labelWalletHDStatusIcon->setToolTip(privkeyDisabled ? tr("Private key <b>disabled</b>") : hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>")); |
|
Only vaguely related, @gmaxwell suggested that perhaps we want a wallet-wide flag to treat all watchonly stuff as normal ismine. That goes further than this PR (also affects all RPC commands), but since the existence of multiwallet there is little reason for anyone to mix different "levels" of ismine in the same wallet. |
… balance 82d6c5a gui: Show watch-only eye instead of HD disabled (Chun Kuan Lee) fe1ff50 Hide spendable label if priveate key is disabled (Chun Kuan Lee) Pull request description: If a wallet is in private key disabled mode, the spendable balance is always zero, it does not have to show on GUI. Show the watch-only balance at normal balance column if a wallet is in that mode.  Tree-SHA512: 8b535427d26d3f8e61081f50e4773bd25656be042d378fd34cf647e9a0065cb4dfb67a8ab9fb4fbf5f196390df8cb983ebf2f0fa8a6503b7c046c56bec87ba72
Summary: bitcoin/bitcoin@fe1ff50 --- Partial backport of Core [[bitcoin/bitcoin#13966 | PR13966]] Test Plan: ninja check ./src/qt/bitcoind -testnet create a watch-only wallet, import some random address, see that there is no spendable label Reviewers: #bitcoin_abc, jasonbcox, deadalnix Reviewed By: #bitcoin_abc, jasonbcox, deadalnix Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D7300
Summary: bitcoin/bitcoin@82d6c5a --- Depends on D7300 Concludes backport of Core [[bitcoin/bitcoin#13966 | PR13966]] Test Plan: ninja check ./src/qt/bitcoin-qt -testnet open a watch-only wallet. see that the HD icon has been replaced by The Eye Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D7301





If a wallet is in private key disabled mode, the spendable balance is always zero, it does not have to show on GUI. Show the watch-only balance at normal balance column if a wallet is in that mode.