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()
120120
121121void WalletModel::checkBalanceChanged (const interfaces::WalletBalances& new_balances)
122122{
123- if (new_balances.balanceChanged (m_cached_balances)) {
123+ if (new_balances.balanceChanged (m_cached_balances)) {
124124 m_cached_balances = new_balances;
125125 Q_EMIT balanceChanged (new_balances);
126126 }
127127}
128128
129+ interfaces::WalletBalances WalletModel::getCachedBalance () const
130+ {
131+ return m_cached_balances;
132+ }
133+
129134void WalletModel::updateTransaction ()
130135{
131136 // 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
157157
158158 uint256 getLastBlockProcessed () const ;
159159
160+ // Retrieve the cached wallet balance
161+ interfaces::WalletBalances getCachedBalance () const ;
162+
160163private:
161164 std::unique_ptr<interfaces::Wallet> m_wallet;
162165 std::unique_ptr<interfaces::Handler> m_handler_unload;
You can’t perform that action at this time.
0 commit comments