From 2bf65dfb8d2104ef72865c5e01c83db4cabe8e41 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 16 Oct 2016 13:17:29 +0100 Subject: wallet_api: do not override invalid payment id Instead, return an empty string to mark the error --- src/wallet/api/wallet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/api') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index d1c849537..37d10614e 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -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(); + return ""; } return m_wallet->get_account().get_public_integrated_address_str(pid, m_wallet->testnet()); } -- cgit v1.2.3