Skip to content

Commit

Permalink
Elements-qt: Avoid mixing assets when using all the available balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Bonel committed Mar 15, 2023
1 parent b4ba5c7 commit cfb7565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry)
CAmount amount = valueFor(model->wallet().getAvailableBalance(*m_coin_control), ::policyAsset);
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) {
if (e && !e->isHidden() && e != entry && e->getValue().asset == ::policyAsset) {
amount -= e->getValue().asset_amount;
}
}
Expand Down

0 comments on commit cfb7565

Please sign in to comment.