aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-01-18 17:05:32 -0500
committerAndrew Chow <achow101-github@achow101.com>2019-01-23 15:18:03 -0500
commit2bc4c3eaf96f5f8490fc79280422916c5d14cde3 (patch)
tree743a1f80a4a38f55e13d02547373c94b0c2c0ace /src/interfaces
parent14bcdbe09cffaef9bcc51dd9de1645db3f0a93db (diff)
downloadbitcoin-2bc4c3eaf96f5f8490fc79280422916c5d14cde3.tar.xz
Notify the GUI that the keypool has changed to set the receive button
Whenever the keypool changes (new keys generated, new seed set, keypool runs out, etc.), notify the GUI that the keypool has changed. The receive button can then be enabled and disabled as necessary.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp4
-rw-r--r--src/interfaces/wallet.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 8db34ed759..7481d51f15 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -488,6 +488,10 @@ public:
{
return MakeHandler(m_wallet.NotifyWatchonlyChanged.connect(fn));
}
+ std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) override
+ {
+ return MakeHandler(m_wallet.NotifyCanGetAddressesChanged.connect(fn));
+ }
std::shared_ptr<CWallet> m_shared_wallet;
CWallet& m_wallet;
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index da60684a4f..72c64ded01 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -271,6 +271,10 @@ public:
//! Register handler for watchonly changed messages.
using WatchOnlyChangedFn = std::function<void(bool have_watch_only)>;
virtual std::unique_ptr<Handler> handleWatchOnlyChanged(WatchOnlyChangedFn fn) = 0;
+
+ //! Register handler for keypool changed messages.
+ using CanGetAddressesChangedFn = std::function<void()>;
+ virtual std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) = 0;
};
//! Tracking object returned by CreateTransaction and passed to CommitTransaction.