aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_responses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-01-24 15:17:36 +0100
committerChristian Grothoff <christian@grothoff.org>2016-01-24 15:17:36 +0100
commitd89c91e64aac6b8ba0a77eb8b95d975776969e2a (patch)
treeead8a1cac5ac5419370b7e61b414a3298f2a6863 /src/mint/taler-mint-httpd_responses.c
parent76b5350c30bb6d36ee548a7de554f388b5068e01 (diff)
parentd6553966f11e24f8f86aa21c0ce3760b6e966006 (diff)
Merge branch 'master' of git+ssh://taler.net/var/git/mint
Diffstat (limited to 'src/mint/taler-mint-httpd_responses.c')
-rw-r--r--src/mint/taler-mint-httpd_responses.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index 98c36283..041f694b 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -1081,7 +1081,7 @@ TMH_RESPONSE_reply_deposit_pending (struct MHD_Connection *connection,
struct GNUNET_TIME_Absolute planned_exec_time)
{
return TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_FOUND,
+ MHD_HTTP_ACCEPTED,
"{s:o}",
"execution_time", TALER_json_from_abs (planned_exec_time));
}
@@ -1117,11 +1117,7 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection,
struct TALER_ConfirmWirePS cw;
struct TALER_MintPublicKeyP pub;
struct TALER_MintSignatureP sig;
- struct TALER_WireTransferIdentifierP wtid_crc;
- char *wtid_s;
- int ret;
- /* Create signature for the reply */
cw.purpose.purpose = htonl (TALER_SIGNATURE_MINT_CONFIRM_WIRE);
cw.purpose.size = htonl (sizeof (struct TALER_ConfirmWirePS));
cw.h_wire = *h_wire;
@@ -1137,24 +1133,18 @@ TMH_RESPONSE_reply_deposit_wtid (struct MHD_Connection *connection,
TMH_KS_sign (&cw.purpose,
&pub,
&sig);
- /* Compute checksum and crockford encoding if wire transfer subject */
- wtid_crc.raw = *wtid;
- wtid_crc.crc8 = GNUNET_CRYPTO_crc8_n (wtid,
- sizeof (struct TALER_WireTransferIdentifierRawP));
-
- wtid_s = GNUNET_STRINGS_data_to_string_alloc (&wtid_crc,
- sizeof (wtid_crc));
- ret = TMH_RESPONSE_reply_json_pack (connection,
+ return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
- "{s:s, s:o, s:o, s:o}",
- "wtid", wtid_s,
+ "{s:o, s:o, s:o, s:o, s:o, s:o}",
+ "wtid", TALER_json_from_data (wtid,
+ sizeof (*wtid)),
"execution_time", TALER_json_from_abs (exec_time),
+ "coin_contribution", TALER_json_from_amount (coin_contribution),
+ "total_amount", TALER_json_from_amount (total_amount),
"mint_sig", TALER_json_from_data (&sig,
sizeof (sig)),
"mint_pub", TALER_json_from_data (&pub,
sizeof (pub)));
- GNUNET_free (wtid_s);
- return ret;
}