Changeset View
Changeset View
Standalone View
Standalone View
src/qt/paymentserver.cpp
Show First 20 Lines • Show All 738 Lines • ▼ Show 20 Lines | void PaymentServer::fetchPaymentACK(interfaces::Wallet &wallet, | ||||
netRequest.setRawHeader("Accept", BIP71_MIMETYPE_PAYMENTACK); | netRequest.setRawHeader("Accept", BIP71_MIMETYPE_PAYMENTACK); | ||||
payments::Payment payment; | payments::Payment payment; | ||||
payment.set_merchant_data(details.merchant_data()); | payment.set_merchant_data(details.merchant_data()); | ||||
payment.add_transactions(transaction.data(), transaction.size()); | payment.add_transactions(transaction.data(), transaction.size()); | ||||
// Create a new refund address, or re-use: | // Create a new refund address, or re-use: | ||||
CTxDestination dest; | CTxDestination dest; | ||||
const OutputType change_type = | const OutputType change_type = OutputType::LEGACY; | ||||
wallet.getDefaultChangeType() != OutputType::CHANGE_AUTO | |||||
? wallet.getDefaultChangeType() | |||||
: wallet.getDefaultAddressType(); | |||||
if (wallet.getNewDestination(change_type, "", dest)) { | if (wallet.getNewDestination(change_type, "", dest)) { | ||||
// BIP70 requests encode the scriptPubKey directly, so we are not | // BIP70 requests encode the scriptPubKey directly, so we are not | ||||
// restricted to address types supported by the receiver. As a result, | // restricted to address types supported by the receiver. As a result, | ||||
// we choose the address format we also use for change. Despite an | // we choose the address format we also use for change. Despite an | ||||
// actual payment and not change, this is a close match: it's the output | // actual payment and not change, this is a close match: it's the output | ||||
// type we use subject to privacy issues, but not restricted by what | // type we use subject to privacy issues, but not restricted by what | ||||
// other software supports. | // other software supports. | ||||
std::string label = tr("Refund from %1") | std::string label = tr("Refund from %1") | ||||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |