Add IsLegacy to CWallet so that the GUI knows whether to show watchonly

This commit is contained in:
Andrew Chow
2019-08-14 14:25:53 -04:00
parent 1cb42b22b1
commit ce24a94494
7 changed files with 34 additions and 11 deletions

View File

@@ -464,6 +464,7 @@ public:
{
RemoveWallet(m_wallet);
}
bool isLegacy() override { return m_wallet->IsLegacy(); }
std::unique_ptr<Handler> handleUnload(UnloadFn fn) override
{
return MakeHandler(m_wallet->NotifyUnload.connect(fn));

View File

@@ -266,6 +266,9 @@ public:
// Remove wallet.
virtual void remove() = 0;
//! Return whether is a legacy wallet
virtual bool isLegacy() = 0;
//! Register handler for unload message.
using UnloadFn = std::function<void()>;
virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;