fix bug where txes with multiple recipients were send from qt as IX while checkbox was not set
This commit is contained in:
parent
3d004ab819
commit
2315b9ab28
@ -303,10 +303,10 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
|||||||
{
|
{
|
||||||
LOCK2(cs_main, wallet->cs_wallet);
|
LOCK2(cs_main, wallet->cs_wallet);
|
||||||
CWalletTx *newTx = transaction.getTransaction();
|
CWalletTx *newTx = transaction.getTransaction();
|
||||||
|
QList<SendCoinsRecipient> recipients = transaction.getRecipients();
|
||||||
|
|
||||||
// Store PaymentRequests in wtx.vOrderForm in wallet.
|
// Store PaymentRequests in wtx.vOrderForm in wallet.
|
||||||
std::string strCommand = "tx";
|
foreach(const SendCoinsRecipient &rcp, recipients)
|
||||||
foreach(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
|
||||||
{
|
{
|
||||||
if (rcp.paymentRequest.IsInitialized())
|
if (rcp.paymentRequest.IsInitialized())
|
||||||
{
|
{
|
||||||
@ -319,18 +319,13 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
|||||||
{
|
{
|
||||||
newTx->vOrderForm.push_back(make_pair("Message", rcp.message.toStdString()));
|
newTx->vOrderForm.push_back(make_pair("Message", rcp.message.toStdString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rcp.useInstantX) {
|
|
||||||
strCommand = "txlreq";
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
CReserveKey *keyChange = transaction.getPossibleKeyChange();
|
CReserveKey *keyChange = transaction.getPossibleKeyChange();
|
||||||
|
|
||||||
transaction.getRecipients();
|
transaction.getRecipients();
|
||||||
|
|
||||||
if(!wallet->CommitTransaction(*newTx, *keyChange, strCommand))
|
if(!wallet->CommitTransaction(*newTx, *keyChange, (recipients[0].useInstantX) ? "txlreq" : "tx"))
|
||||||
return TransactionCommitFailed;
|
return TransactionCommitFailed;
|
||||||
|
|
||||||
CTransaction* t = (CTransaction*)newTx;
|
CTransaction* t = (CTransaction*)newTx;
|
||||||
|
Loading…
Reference in New Issue
Block a user