Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tx size estimation fixed on Send dialog #1411

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading