Merge pull request #3069 from Diapolo/fix_addressbook
don't touch addressbook when using secure payment-requests
This commit is contained in:
commit
a2bb571c4f
1 changed files with 18 additions and 14 deletions
|
@ -257,6 +257,9 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||||
// Add addresses / update labels that we've sent to to the address book,
|
// Add addresses / update labels that we've sent to to the address book,
|
||||||
// and emit coinsSent signal for each recipient
|
// and emit coinsSent signal for each recipient
|
||||||
foreach(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
foreach(const SendCoinsRecipient &rcp, transaction.getRecipients())
|
||||||
|
{
|
||||||
|
// Don't touch the address book when we have a secure payment-request
|
||||||
|
if (rcp.authenticatedMerchant.isEmpty())
|
||||||
{
|
{
|
||||||
std::string strAddress = rcp.address.toStdString();
|
std::string strAddress = rcp.address.toStdString();
|
||||||
CTxDestination dest = CBitcoinAddress(strAddress).Get();
|
CTxDestination dest = CBitcoinAddress(strAddress).Get();
|
||||||
|
@ -276,6 +279,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
|
||||||
wallet->SetAddressBook(dest, strLabel, ""); // "" means don't change purpose
|
wallet->SetAddressBook(dest, strLabel, ""); // "" means don't change purpose
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
emit coinsSent(wallet, rcp, transaction_array);
|
emit coinsSent(wallet, rcp, transaction_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue