Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodel.cpp
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | #endif | ||||
// Message from normal bitcoincash:URI | // Message from normal bitcoincash:URI | ||||
// (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; | wallet().commitTransaction(newTx, {} /* mapValue */, std::move(vOrderForm)); | ||||
if (!wallet().commitTransaction(newTx, {} /* mapValue */, | |||||
std::move(vOrderForm), rejectReason)) { | |||||
return SendCoinsReturn(TransactionCommitFailed, | |||||
QString::fromStdString(rejectReason)); | |||||
} | |||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); | ||||
ssTx << *newTx; | 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()) { | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |