aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet.cpp
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-10-05 19:01:26 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-10-06 15:47:29 +0300
commitdb3282cdf00aae69fdd38680b4f58999d8c5d34a (patch)
tree68953a8e6f146411aff6d31489b47941ba6ca0d4 /src/wallet/api/wallet.cpp
parentlibwallet_api: fixes for transaction history (diff)
downloadmonero-db3282cdf00aae69fdd38680b4f58999d8c5d34a.tar.xz
Initialize transaction history if empty
Diffstat (limited to 'src/wallet/api/wallet.cpp')
-rw-r--r--src/wallet/api/wallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 4d35bc404..eb6fe5db2 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -723,6 +723,12 @@ void WalletImpl::doRefresh()
boost::lock_guard<boost::mutex> guarg(m_refreshMutex2);
try {
m_wallet->refresh();
+ // assuming if we have empty history, it wasn't initialized yet
+ // for futher history changes client need to update history in
+ // "on_money_received" and "on_money_sent" callbacks
+ if (m_history->count() == 0) {
+ m_history->refresh();
+ }
} catch (const std::exception &e) {
m_status = Status_Error;
m_errorString = e.what();