diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-16 13:54:53 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-10-16 13:54:53 +0100 |
commit | b6b86ab347c2dc858741c6192f5e5b7f93b91cac (patch) | |
tree | a0fb7b0fcdba2e7b933f22623e92c58a6a01f071 /src/wallet/api/wallet.cpp | |
parent | Merge pull request #1203 (diff) | |
download | monero-b6b86ab347c2dc858741c6192f5e5b7f93b91cac.tar.xz |
wallet2_api: recognize full size payment ids as valid
Diffstat (limited to '')
-rw-r--r-- | src/wallet/api/wallet.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index d1c849537..95d4147b9 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() |