Skip to content

Commit

Permalink
interfaces: Add remove to Wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Feb 12, 2019
1 parent 029d28a commit f6122ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/interfaces/wallet.cpp
Expand Up @@ -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<Handler> handleUnload(UnloadFn fn) override
{
return MakeHandler(m_wallet.NotifyUnload.connect(fn));
Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/wallet.h
Expand Up @@ -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<void()>;
virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;
Expand Down

0 comments on commit f6122ab

Please sign in to comment.