Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | #endif | ||||
// (bitcoincash:123...?message=example) | // (bitcoincash:123...?message=example) | ||||
vOrderForm.emplace_back("Message", rcp.message.toStdString()); | vOrderForm.emplace_back("Message", rcp.message.toStdString()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
auto &newTx = transaction.getWtx(); | auto &newTx = transaction.getWtx(); | ||||
std::string rejectReason; | std::string rejectReason; | ||||
if (!newTx->commit({} /* mapValue */, std::move(vOrderForm), | if (!wallet().commitTransaction(newTx, {} /* mapValue */, | ||||
rejectReason)) { | std::move(vOrderForm), rejectReason)) { | ||||
return SendCoinsReturn(TransactionCommitFailed, | return SendCoinsReturn(TransactionCommitFailed, | ||||
QString::fromStdString(rejectReason)); | QString::fromStdString(rejectReason)); | ||||
} | } | ||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | ||||
ssTx << newTx->get(); | ssTx << *newTx; | ||||
transaction_array.append(&(ssTx[0]), ssTx.size()); | transaction_array.append(&(ssTx[0]), ssTx.size()); | ||||
// Add addresses / update labels that we've sent to the address book, and | // Add addresses / update labels that we've sent to the address book, and | ||||
// emit coinsSent signal for each recipient | // emit coinsSent signal for each recipient | ||||
for (const SendCoinsRecipient &rcp : transaction.getRecipients()) { | for (const SendCoinsRecipient &rcp : transaction.getRecipients()) { | ||||
// Don't touch the address book when we have a payment request | // Don't touch the address book when we have a payment request | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
if (!rcp.paymentRequest.IsInitialized()) | if (!rcp.paymentRequest.IsInitialized()) | ||||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |