Skip to content

Commit 63d79dd

Browse files
authored
Merge pull request #1222 from andreabonel/qt_avoid_mixing_assets_when_using_all_the_available
Elements-qt: Avoid mixing assets when using all the available balance
2 parents b4ba5c7 + cfb7565 commit 63d79dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ void SendCoinsDialog::useAvailableBalance(SendCoinsEntry* entry)
781781
CAmount amount = valueFor(model->wallet().getAvailableBalance(*m_coin_control), ::policyAsset);
782782
for (int i = 0; i < ui->entries->count(); ++i) {
783783
SendCoinsEntry* e = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
784-
if (e && !e->isHidden() && e != entry) {
784+
if (e && !e->isHidden() && e != entry && e->getValue().asset == ::policyAsset) {
785785
amount -= e->getValue().asset_amount;
786786
}
787787
}

0 commit comments

Comments
 (0)