File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,17 @@ void WalletModel::pollBalanceChanged()
120
120
121
121
void WalletModel::checkBalanceChanged (const interfaces::WalletBalances& new_balances)
122
122
{
123
- if (new_balances.balanceChanged (m_cached_balances)) {
123
+ if (new_balances.balanceChanged (m_cached_balances)) {
124
124
m_cached_balances = new_balances;
125
125
Q_EMIT balanceChanged (new_balances);
126
126
}
127
127
}
128
128
129
+ interfaces::WalletBalances WalletModel::getCachedBalance () const
130
+ {
131
+ return m_cached_balances;
132
+ }
133
+
129
134
void WalletModel::updateTransaction ()
130
135
{
131
136
// Balance and number of transactions might have changed
Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ class WalletModel : public QObject
157
157
158
158
uint256 getLastBlockProcessed () const ;
159
159
160
+ // Retrieve the cached wallet balance
161
+ interfaces::WalletBalances getCachedBalance () const ;
162
+
160
163
private:
161
164
std::unique_ptr<interfaces::Wallet> m_wallet;
162
165
std::unique_ptr<interfaces::Handler> m_handler_unload;
You can’t perform that action at this time.
0 commit comments