Skip to content

Commit

Permalink
Tx size estimation fixed on Send dialog (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 authored Feb 8, 2024
1 parent d425731 commit 0f9d27d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,17 @@ void SendCoinsDialog::on_sendButton_clicked()
}
QString questionString = tr("Are you sure you want to send?");
questionString.append("<br /><br />%1");
double txSize;
if ((fAnonymousMode == false) && (recipients.size() == sparkAddressCount) && spark::IsSparkAllowed())
{
for (auto &transaction : transactions) {
txFee += transaction.getTransactionFee();
mintSparkAmount += transaction.getTotalTransactionAmount();
txSize += (double)transaction.getTransactionSize();
}
} else {
txFee= currentTransaction.getTransactionFee();
txFee = currentTransaction.getTransactionFee();
txSize = (double)currentTransaction.getTransactionSize();
}

if(txFee > 0)
Expand All @@ -480,7 +483,7 @@ void SendCoinsDialog::on_sendButton_clicked()
questionString.append(tr("added as transaction fee"));

// append transaction size
questionString.append(" (" + QString::number((double)currentTransaction.getTransactionSize() / 1000) + " kB)");
questionString.append(" (" + QString::number(txSize / 1000) + " kB)");
}

// add total amount in all subdivision units
Expand Down

0 comments on commit 0f9d27d

Please sign in to comment.