diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-04-27 11:26:15 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-08-12 13:06:05 -0300 |
commit | 050e8b139145d6991e740b0e5f2b3364663dd348 (patch) | |
tree | 4fd97eb4024445bcbee968264f9e4adc46ac447c /src/qt/sendcoinsdialog.cpp | |
parent | 96e3264a82c51b456703f500bd98e8cb98115697 (diff) | |
download | bitcoin-050e8b139145d6991e740b0e5f2b3364663dd348.tar.xz |
GUI: 'getAvailableBalance', use cached balance if the user did not select UTXO manually
No need to walk through the entire wallet's tx map. Used for 'walletModel::prepareTransaction' and 'useAvailable' flow in sendcoinsdialog.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 8960045d25..5f6f35e9c0 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -795,7 +795,7 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry) m_coin_control->fAllowWatchOnly = model->wallet().privateKeysDisabled() && !model->wallet().hasExternalSigner(); // Calculate available amount to send. - CAmount amount = model->wallet().getAvailableBalance(*m_coin_control); + CAmount amount = model->getAvailableBalance(m_coin_control.get()); for (int i = 0; i < ui->entries->count(); ++i) { SendCoinsEntry* e = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget()); if (e && !e->isHidden() && e != entry) { |