Changeset View
Changeset View
Standalone View
Standalone View
src/qt/sendcoinsdialog.cpp
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Lines | void SendCoinsDialog::on_sendButton_clicked() { | ||||
// Format confirmation message | // Format confirmation message | ||||
QStringList formatted; | QStringList formatted; | ||||
for (const SendCoinsRecipient &rcp : currentTransaction.getRecipients()) { | for (const SendCoinsRecipient &rcp : currentTransaction.getRecipients()) { | ||||
// generate amount string with wallet name in case of multiwallet | // generate amount string with wallet name in case of multiwallet | ||||
QString amount = BitcoinUnits::formatWithUnit( | QString amount = BitcoinUnits::formatWithUnit( | ||||
model->getOptionsModel()->getDisplayUnit(), rcp.amount); | model->getOptionsModel()->getDisplayUnit(), rcp.amount); | ||||
if (model->isMultiwallet()) { | if (model->isMultiwallet()) { | ||||
amount.append(tr(" from wallet '%1'").arg(model->getWalletName())); | amount.append( | ||||
tr(" from wallet '%1'") | |||||
.arg(GUIUtil::HtmlEscape(model->getWalletName()))); | |||||
} | } | ||||
// generate address string | // generate address string | ||||
QString address = rcp.address; | QString address = rcp.address; | ||||
QString recipientElement; | QString recipientElement; | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
// normal payment | // normal payment | ||||
if (!rcp.paymentRequest.IsInitialized()) | if (!rcp.paymentRequest.IsInitialized()) | ||||
#endif | #endif | ||||
{ | { | ||||
if (rcp.label.length() > 0) { | if (rcp.label.length() > 0) { | ||||
// label with address | // label with address | ||||
recipientElement.append( | recipientElement.append( | ||||
tr("%1 to '%2'").arg(amount, rcp.label)); | tr("%1 to '%2'") | ||||
.arg(amount, GUIUtil::HtmlEscape(rcp.label))); | |||||
recipientElement.append(QString(" (%1)").arg(address)); | recipientElement.append(QString(" (%1)").arg(address)); | ||||
} else { | } else { | ||||
// just address | // just address | ||||
recipientElement.append(tr("%1 to %2").arg(amount, address)); | recipientElement.append(tr("%1 to %2").arg(amount, address)); | ||||
} | } | ||||
} | } | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
// authenticated payment request | // authenticated payment request | ||||
▲ Show 20 Lines • Show All 690 Lines • Show Last 20 Lines |