From 40087a745f7677d29642c9ff86e1583c34ed1748 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Mon, 16 May 2016 13:11:44 +0300 Subject: WalletListener::moneySpent test --- src/wallet/api/wallet.cpp | 8 ++++++++ src/wallet/wallet2_api.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/wallet') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 5819e42bc..440642291 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -50,6 +50,12 @@ namespace { struct Wallet2CallbackImpl : public tools::i_wallet2_callback { + Wallet2CallbackImpl() + : m_listener(nullptr) + { + + } + ~Wallet2CallbackImpl() { @@ -109,6 +115,8 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback Wallet::~Wallet() {} +WalletListener::~WalletListener() {} + string Wallet::displayAmount(uint64_t amount) { return cryptonote::print_money(amount); diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index d38fd6708..7841c299d 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -106,8 +106,8 @@ struct TransactionHistory struct WalletListener { virtual ~WalletListener() = 0; - virtual void moneySpent(const std::string &txId, uint64_t amount); - virtual void moneyReceived(const std::string &txId, uint64_t amount); + virtual void moneySpent(const std::string &txId, uint64_t amount) = 0; + virtual void moneyReceived(const std::string &txId, uint64_t amount) = 0; // TODO: on_skip_transaction; }; -- cgit v1.2.3