mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-19 01:22:21 +02:00
qt, refactor: Drop superfluous type conversions
This commit is contained in:
parent
f4e96c29a6
commit
d8298e7f06
@ -167,13 +167,13 @@ void PSBTOperationsDialog::saveTransaction() {
|
||||
}
|
||||
|
||||
void PSBTOperationsDialog::updateTransactionDisplay() {
|
||||
m_ui->transactionDescription->setText(QString::fromStdString(renderTransaction(m_transaction_data)));
|
||||
m_ui->transactionDescription->setText(renderTransaction(m_transaction_data));
|
||||
showTransactionStatus(m_transaction_data);
|
||||
}
|
||||
|
||||
std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx)
|
||||
QString PSBTOperationsDialog::renderTransaction(const PartiallySignedTransaction &psbtx)
|
||||
{
|
||||
QString tx_description = "";
|
||||
QString tx_description;
|
||||
CAmount totalAmount = 0;
|
||||
for (const CTxOut& out : psbtx.tx->vout) {
|
||||
CTxDestination address;
|
||||
@ -217,7 +217,7 @@ std::string PSBTOperationsDialog::renderTransaction(const PartiallySignedTransac
|
||||
tx_description.append(tr("Transaction has %1 unsigned inputs.").arg(QString::number(num_unsigned)));
|
||||
}
|
||||
|
||||
return tx_description.toStdString();
|
||||
return tx_description;
|
||||
}
|
||||
|
||||
void PSBTOperationsDialog::showStatus(const QString &msg, StatusLevel level) {
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define BITCOIN_QT_PSBTOPERATIONSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QString>
|
||||
|
||||
#include <psbt.h>
|
||||
#include <qt/clientmodel.h>
|
||||
@ -46,7 +47,7 @@ private:
|
||||
|
||||
size_t couldSignInputs(const PartiallySignedTransaction &psbtx);
|
||||
void updateTransactionDisplay();
|
||||
std::string renderTransaction(const PartiallySignedTransaction &psbtx);
|
||||
QString renderTransaction(const PartiallySignedTransaction &psbtx);
|
||||
void showStatus(const QString &msg, StatusLevel level);
|
||||
void showTransactionStatus(const PartiallySignedTransaction &psbtx);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user