aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorJonas Schnelli <[email protected]>2019-02-14 10:46:22 -1000
committerJonas Schnelli <[email protected]>2019-02-14 10:46:48 -1000
commitb7456e6bf9d1bebc0e3b8d3386da5f2b3a303a04 (patch)
tree671c15a7cd14a5485dca91b6aac82780a284e65b /src/interfaces
parentMerge #15393: build: Bump minimum Qt version to 5.5.1 (diff)
parentgui: Add close wallet action (diff)
downloaddiscoin-b7456e6bf9d1bebc0e3b8d3386da5f2b3a303a04.tar.xz
discoin-b7456e6bf9d1bebc0e3b8d3386da5f2b3a303a04.zip
Merge #15195: gui: Add Close Wallet action
94086fb59 gui: Add close wallet action (João Barbosa) f77ba3431 gui: Add closeWallet to WalletController (João Barbosa) f6122abe0 interfaces: Add remove to Wallet (João Barbosa) Pull request description: This PR adds support to close the current wallet in the GUI. <img width="543" alt="screenshot 2019-01-18 at 00 44 26" src="https://user-images.githubusercontent.com/3534524/51358241-424b9680-1aba-11e9-88f2-b85869507737.png"> <img width="532" alt="screenshot 2019-01-18 at 00 44 38" src="https://user-images.githubusercontent.com/3534524/51358242-424b9680-1aba-11e9-83e2-fa275a9017b3.png"> Tree-SHA512: fd7da4d0f73dc240864cc57a1ff1526daf2376904ce3872e52eeca5d40cc21c6dd29eb2ef25f85ffa63697362c150221a2369d80ad36ae445cc99989d337b688
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp4
-rw-r--r--src/interfaces/wallet.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index 206227b10..5b5430037 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -468,6 +468,10 @@ public:
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<Handler> handleUnload(UnloadFn fn) override
{
return MakeHandler(m_wallet.NotifyUnload.connect(fn));
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index a86212356..a931e5faf 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -247,6 +247,9 @@ public:
// Get default change type.
virtual OutputType getDefaultChangeType() = 0;
+ // Remove wallet.
+ virtual void remove() = 0;
+
//! Register handler for unload message.
using UnloadFn = std::function<void()>;
virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;