diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index f71cbd85..15cffe2a 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -634,8 +634,8 @@ void WalletImpl::doRefresh() std::lock_guard guarg(m_refreshMutex2); try { m_wallet->refresh(); - if (m_walletListener) { - m_walletListener->refreshed(); + if (m_wallet2Callback->getListener()) { + m_wallet2Callback->getListener()->refreshed(); } } catch (const std::exception &e) { m_status = Status_Error; diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index a51d38a7..f6c57367 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -189,10 +189,14 @@ struct Wallet static std::string genPaymentId(); static bool paymentIdValid(const std::string &paiment_id); - // TODO? - // virtual uint64_t unlockedDustBalance() const = 0; + /** + * @brief refresh - refreshes the wallet, updating transactions from daemon + * @return - true if refreshed successfully; + */ virtual bool refresh() = 0; - + /** + * @brief refreshAsync - refreshes wallet asynchronously. + */ virtual void refreshAsync() = 0; /*! * \brief createTransaction creates transaction. if dst_addr is an integrated address, payment_id is ignored