mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +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;
|
||||
newTx = m_wallet->createTransaction(vecSend, coinControl, true /* sign */, nChangePosRet, nFeeRequired, out_amounts, strFailReason);
|
||||
transaction.setTransactionFee(nFeeRequired);
|
||||
if (fSubtractFeeFromAmount && newTx)
|
||||
if (fSubtractFeeFromAmount && newTx) {
|
||||
assert(out_amounts.size() == newTx->get().vout.size());
|
||||
transaction.reassignAmounts(out_amounts, nChangePosRet);
|
||||
}
|
||||
|
||||
if(!newTx)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue