From f6122abe03699423faca29035f16f3afc527f4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Thu, 17 Jan 2019 17:37:46 +0000 Subject: [PATCH] interfaces: Add remove to Wallet --- src/interfaces/wallet.cpp | 4 ++++ src/interfaces/wallet.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 206227b101ba2..5b5430037cc52 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -468,6 +468,10 @@ class WalletImpl : public Wallet bool IsWalletFlagSet(uint64_t flag) override { return m_wallet.IsWalletFlagSet(flag); } OutputType getDefaultAddressType() override { return m_wallet.m_default_address_type; } OutputType getDefaultChangeType() override { return m_wallet.m_default_change_type; } + void remove() override + { + RemoveWallet(m_shared_wallet); + } std::unique_ptr handleUnload(UnloadFn fn) override { return MakeHandler(m_wallet.NotifyUnload.connect(fn)); diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index a86212356cbbf..a931e5fafb702 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -247,6 +247,9 @@ class Wallet // Get default change type. virtual OutputType getDefaultChangeType() = 0; + // Remove wallet. + virtual void remove() = 0; + //! Register handler for unload message. using UnloadFn = std::function; virtual std::unique_ptr handleUnload(UnloadFn fn) = 0;