Changeset View
Changeset View
Standalone View
Standalone View
src/qt/walletmodeltransaction.cpp
Show All 12 Lines | |||||
WalletModelTransaction::WalletModelTransaction( | WalletModelTransaction::WalletModelTransaction( | ||||
const QList<SendCoinsRecipient> &_recipients) | const QList<SendCoinsRecipient> &_recipients) | ||||
: recipients(_recipients), fee() {} | : recipients(_recipients), fee() {} | ||||
QList<SendCoinsRecipient> WalletModelTransaction::getRecipients() const { | QList<SendCoinsRecipient> WalletModelTransaction::getRecipients() const { | ||||
return recipients; | return recipients; | ||||
} | } | ||||
std::unique_ptr<interfaces::PendingWalletTx> &WalletModelTransaction::getWtx() { | CTransactionRef &WalletModelTransaction::getWtx() { | ||||
return wtx; | return wtx; | ||||
} | } | ||||
unsigned int WalletModelTransaction::getTransactionSize() { | unsigned int WalletModelTransaction::getTransactionSize() { | ||||
return wtx ? wtx->get().GetTotalSize() : 0; | return wtx ? wtx->GetTotalSize() : 0; | ||||
} | } | ||||
Amount WalletModelTransaction::getTransactionFee() const { | Amount WalletModelTransaction::getTransactionFee() const { | ||||
return fee; | return fee; | ||||
} | } | ||||
void WalletModelTransaction::setTransactionFee(const Amount newFee) { | void WalletModelTransaction::setTransactionFee(const Amount newFee) { | ||||
fee = newFee; | fee = newFee; | ||||
} | } | ||||
void WalletModelTransaction::reassignAmounts(int nChangePosRet) { | void WalletModelTransaction::reassignAmounts(int nChangePosRet) { | ||||
const CTransaction *walletTransaction = &wtx->get(); | const CTransaction *walletTransaction = wtx.get(); | ||||
int i = 0; | int i = 0; | ||||
for (SendCoinsRecipient &rcp : recipients) { | for (SendCoinsRecipient &rcp : recipients) { | ||||
#ifdef ENABLE_BIP70 | #ifdef ENABLE_BIP70 | ||||
if (rcp.paymentRequest.IsInitialized()) { | if (rcp.paymentRequest.IsInitialized()) { | ||||
Amount subtotal = Amount::zero(); | Amount subtotal = Amount::zero(); | ||||
const payments::PaymentDetails &details = | const payments::PaymentDetails &details = | ||||
rcp.paymentRequest.getDetails(); | rcp.paymentRequest.getDetails(); | ||||
for (int j = 0; j < details.outputs_size(); j++) { | for (int j = 0; j < details.outputs_size(); j++) { | ||||
Show All 36 Lines |