From b6b86ab347c2dc858741c6192f5e5b7f93b91cac Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 16 Oct 2016 13:54:53 +0100 Subject: [PATCH] wallet2_api: recognize full size payment ids as valid --- src/wallet/api/wallet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index d1c84953..95d4147b 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -158,8 +158,13 @@ std::string Wallet::genPaymentId() bool Wallet::paymentIdValid(const string &paiment_id) { - crypto::hash8 pid; - return tools::wallet2::parse_short_payment_id(paiment_id, pid); + crypto::hash8 pid8; + if (tools::wallet2::parse_short_payment_id(paiment_id, pid8)) + return true; + crypto::hash pid; + if (tools::wallet2::parse_long_payment_id(paiment_id, pid)) + return true; + return false; } uint64_t Wallet::maximumAllowedAmount()