From 00ed12bd6c6457749e018b93301ec18c1a0624ab Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Fri, 24 Jun 2016 16:17:06 +0300 Subject: Wallet::paymentIdValid --- src/wallet/api/wallet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/wallet/api/wallet.cpp') diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index be379cb99..5a0642f30 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -144,6 +144,12 @@ std::string Wallet::genPaymentId() } +bool Wallet::paymentIdValid(const string &paiment_id) +{ + crypto::hash8 pid; + return tools::wallet2::parse_short_payment_id(paiment_id, pid); +} + ///////////////////////// WalletImpl implementation //////////////////////// WalletImpl::WalletImpl(bool testnet) -- cgit v1.2.3