mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
QT: Add bracket to not reassign values on non-tx
This commit is contained in:
parent
88c256f751
commit
17229bfb8c
1 changed files with 2 additions and 1 deletions
|
|
@ -236,9 +236,10 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
||||||
std::vector<CAmount> out_amounts;
|
std::vector<CAmount> out_amounts;
|
||||||
newTx = m_wallet->createTransaction(vecSend, coinControl, true /* sign */, nChangePosRet, nFeeRequired, out_amounts, strFailReason);
|
newTx = m_wallet->createTransaction(vecSend, coinControl, true /* sign */, nChangePosRet, nFeeRequired, out_amounts, strFailReason);
|
||||||
transaction.setTransactionFee(nFeeRequired);
|
transaction.setTransactionFee(nFeeRequired);
|
||||||
if (fSubtractFeeFromAmount && newTx)
|
if (fSubtractFeeFromAmount && newTx) {
|
||||||
assert(out_amounts.size() == newTx->get().vout.size());
|
assert(out_amounts.size() == newTx->get().vout.size());
|
||||||
transaction.reassignAmounts(out_amounts, nChangePosRet);
|
transaction.reassignAmounts(out_amounts, nChangePosRet);
|
||||||
|
}
|
||||||
|
|
||||||
if(!newTx)
|
if(!newTx)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue