diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-07-20 13:52:54 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-07-20 13:52:54 +0200 |
commit | 07f1d4e04d5b2f99828c1e0dbd3a513ef33e9a90 (patch) | |
tree | 3eb0b29601c3b45ad88eb8335c069c50d690a6ad | |
parent | Merge pull request #897 (diff) | |
parent | wallet_rpc_server: add payment id from integrated addresses to extra (diff) | |
download | monero-07f1d4e04d5b2f99828c1e0dbd3a513ef33e9a90.tar.xz |
Merge pull request #899
a95a2cb wallet_rpc_server: add payment id from integrated addresses to extra (moneromooo-monero)
-rw-r--r-- | src/wallet/wallet_rpc_server.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 6c5c35161..5c42e1c53 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -168,6 +168,13 @@ namespace tools } integrated_payment_id = new_payment_id; cryptonote::set_encrypted_payment_id_to_tx_extra_nonce(extra_nonce, integrated_payment_id); + + /* 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 integrated payment_id."; + return false; + } } } @@ -197,7 +204,7 @@ namespace tools /* 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 wront with payment_id. Please check its format: \"" + payment_id_str + "\", expected 64-character string"; + er.message = "Something went wrong with payment_id. Please check its format: \"" + payment_id_str + "\", expected 64-character string"; return false; } |