GUI: add getter for WalletModel::m_cached_balances field

No need to guard it as it is/will only be accessed from the main thread for now
This commit is contained in:
furszy 2022-05-09 11:24:20 -03:00
parent e62958dc81
commit 321335bf02
No known key found for this signature in database
GPG Key ID: 5DD23CCC686AA623
2 changed files with 9 additions and 1 deletions

View File

@ -126,6 +126,11 @@ void WalletModel::checkBalanceChanged(const interfaces::WalletBalances& new_bala
}
}
interfaces::WalletBalances WalletModel::getCachedBalance() const
{
return m_cached_balances;
}
void WalletModel::updateTransaction()
{
// Balance and number of transactions might have changed

View File

@ -157,6 +157,9 @@ public:
uint256 getLastBlockProcessed() const;
// Retrieve the cached wallet balance
interfaces::WalletBalances getCachedBalance() const;
private:
std::unique_ptr<interfaces::Wallet> m_wallet;
std::unique_ptr<interfaces::Handler> m_handler_unload;