Menu action to export a watchonly wallet - #872
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsNo conflicts as of last run. |
033db04 to
da9365f
Compare
da9365f to
fe863d1
Compare
fe863d1 to
6b252fe
Compare
66824c5 to
59fd6f9
Compare
There was a problem hiding this comment.
The base PR (bitcoin/bitcoin#32489) has been merged, this will need a rebase.
Reviewed the GUI commit (59fd6f9):
- The action is enabled for all wallets. Please consider disabling it for already-watchonly wallets — here cdd15e1 you have a Qt test covering the action verifying it's enabled/disabled correctly per wallet type.
- Missing release notes for a new user-facing menu action.
- Please consider the comment from @Sjors regarding
CHECK_NONFATAL(if it's still relevant).
59fd6f9 to
adc9258
Compare
There is a variant of QObject::connect which takes 3 arguments. Add a variant of ExceptioNSafeConnect that does the same thing.
adc9258 to
8ff9d70
Compare
|
Rebased.
Done
This test is not useful, it isn't testing the action directly. I don't think it is possible with the current GUI tests to properly test this behavior as there is no access to the
Done I think the GUI should add global exception handling, but I've changed this to add another |
|
Concept ACK. CI is unhappy. |
|
Concept ACK
I think that is because of the declaration outside the In the header ( QAction* m_migrate_wallet_action{nullptr};
QMenu* m_migrate_wallet_menu{nullptr};
#ifdef ENABLE_WALLET
QLabel *m_wallet_selector_label = nullptr;
QComboBox* m_wallet_selector = nullptr;
QAction* m_export_watchonly_action{nullptr};
#endif // ENABLE_WALLET
QSystemTrayIcon* trayIcon = nullptr;
const std::unique_ptr<QMenu> trayIconMenu;But the new QAction declaration is outside, I think this should fix it: $ git diff
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 690ad86390..da8989a564 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -377,10 +377,6 @@ void BitcoinGUI::createActions()
m_mask_values_action->setStatusTip(tr("Mask the values in the Overview tab"));
m_mask_values_action->setCheckable(true);
- m_export_watchonly_action = new QAction(tr("Export watch-only wallet"), this);
- m_export_watchonly_action->setEnabled(false);
- m_export_watchonly_action->setStatusTip(tr("Export a watch-only version of the current wallet that can be restored onto another node."));
-
connect(quitAction, &QAction::triggered, this, &BitcoinGUI::quitRequested);
connect(aboutAction, &QAction::triggered, this, &BitcoinGUI::aboutClicked);
connect(aboutQtAction, &QAction::triggered, qApp, QApplication::aboutQt);
@@ -393,6 +389,10 @@ void BitcoinGUI::createActions()
#ifdef ENABLE_WALLET
if(walletFrame)
{
+ m_export_watchonly_action = new QAction(tr("Export watch-only wallet"), this);
+ m_export_watchonly_action->setEnabled(false);
+ m_export_watchonly_action->setStatusTip(tr("Export a watch-only version of the current wallet that can be restored onto another node."));
+
connect(encryptWalletAction, &QAction::triggered, walletFrame, &WalletFrame::encryptWallet);
connect(backupWalletAction, &QAction::triggered, walletFrame, &WalletFrame::backupWallet);
connect(changePassphraseAction, &QAction::triggered, walletFrame, &WalletFrame::changePassphrase);
Or you can maybe move the declaration under |
8ff9d70 to
6573196
Compare
|
lgtm ACK 6573196 |
Allows a user to export a watchonly version of their wallet to be used in an airgapped setup.
Built on bitcoin/bitcoin#32489