wallet_api: do not override invalid payment id

Instead, return an empty string to mark the error
This commit is contained in:
moneromooo-monero 2016-10-16 13:17:29 +01:00
parent 34fcfcd7cc
commit 2bf65dfb8d
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ std::string WalletImpl::integratedAddress(const std::string &payment_id) const
{
crypto::hash8 pid;
if (!tools::wallet2::parse_short_payment_id(payment_id, pid)) {
pid = crypto::rand<crypto::hash8>();
return "";
}
return m_wallet->get_account().get_public_integrated_address_str(pid, m_wallet->testnet());
}