wallet: remove long payment ID sending support

This commit is contained in:
moneromooo-monero 2019-06-18 09:28:27 +00:00
parent 455f9e3e9f
commit 19c0506e14
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
7 changed files with 23 additions and 125 deletions

View file

@ -793,30 +793,9 @@ namespace tools
if (!payment_id.empty())
{
/* Just to clarify */
const std::string& payment_id_str = payment_id;
crypto::hash long_payment_id;
crypto::hash8 short_payment_id;
/* Parse payment ID */
if (wallet2::parse_long_payment_id(payment_id_str, long_payment_id)) {
cryptonote::set_payment_id_to_tx_extra_nonce(extra_nonce, long_payment_id);
}
else {
er.code = WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID;
er.message = "Payment id has invalid format: \"" + payment_id_str + "\", expected 64 character string";
return false;
}
/* Append Payment ID data into extra */
if (!cryptonote::add_extra_nonce_to_tx_extra(extra, extra_nonce)) {
er.code = WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID;
er.message = "Something went wrong with payment_id. Please check its format: \"" + payment_id_str + "\", expected 64-character string";
return false;
}
er.code = WALLET_RPC_ERROR_CODE_WRONG_PAYMENT_ID;
er.message = "Standalone payment IDs are obsolete. Use subaddresses or integrated addresses instead";
return false;
}
return true;
}