aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-10 13:45:01 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-07-10 13:46:18 +0100
commita95a2cbc4d1683e59fd002f792aa8ef6c02aa24f (patch)
tree105bfd95c81d6a913a049588264ddb7241ca4cb9 /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #889 (diff)
downloadmonero-a95a2cbc4d1683e59fd002f792aa8ef6c02aa24f.tar.xz
wallet_rpc_server: add payment id from integrated addresses to extra
Diffstat (limited to 'src/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 01ae00fe5..a15cd3cfe 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;
}