diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-09 22:02:29 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-09 22:02:29 +0100 |
commit | 025922950dcf39700625e04be9f6037af67dddf5 (patch) | |
tree | 89b14956f470210e716b46dde8615221e51d1d72 /src/exchange/taler-exchange-httpd_csr.c | |
parent | e6598cfa1a81f6b040718933496436987d21194b (diff) | |
download | exchange-025922950dcf39700625e04be9f6037af67dddf5.tar.gz exchange-025922950dcf39700625e04be9f6037af67dddf5.tar.bz2 exchange-025922950dcf39700625e04be9f6037af67dddf5.zip |
pass exchange values to /recoup
Diffstat (limited to 'src/exchange/taler-exchange-httpd_csr.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_csr.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-httpd_csr.c b/src/exchange/taler-exchange-httpd_csr.c index 7417996dc..02bdb7dd6 100644 --- a/src/exchange/taler-exchange-httpd_csr.c +++ b/src/exchange/taler-exchange-httpd_csr.c @@ -41,7 +41,6 @@ TEH_handler_csr (struct TEH_RequestContext *rc, json_t *csr_requests; json_t *csr_response_ewvs; json_t *csr_response; - struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_json ("nks", &csr_requests), @@ -103,13 +102,15 @@ TEH_handler_csr (struct TEH_RequestContext *rc, } GNUNET_JSON_parse_free (spec); - struct TALER_DenominationCSPublicRPairP r_pubs[GNUNET_NZL (csr_requests_num)]; + struct TALER_ExchangeWithdrawValues ewvs[GNUNET_NZL (csr_requests_num)]; for (unsigned int i = 0; i < csr_requests_num; i++) { const struct TALER_CsNonce *nonce = &nonces[i]; const struct TALER_DenominationHash *denom_pub_hash = &denom_pub_hashes[i]; - struct TALER_DenominationCSPublicRPairP *r_pub = &r_pubs[i]; + struct TALER_DenominationCSPublicRPairP *r_pub + = &ewvs[i].details.cs_values.r_pub_pair; + ewvs[i].cipher = TALER_DENOMINATION_CS; // check denomination referenced by denom_pub_hash { struct TEH_KeyStateHandle *ksh; @@ -187,16 +188,11 @@ TEH_handler_csr (struct TEH_RequestContext *rc, csr_response_ewvs = json_array (); for (unsigned int i = 0; i < csr_requests_num; i++) { - const struct TALER_DenominationCSPublicRPairP *r_pub = &r_pubs[i]; json_t *csr_obj; csr_obj = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_data_varsize ("r_pub_0", - &r_pub->r_pub[0], - sizeof(struct GNUNET_CRYPTO_CsRPublic)), - GNUNET_JSON_pack_data_varsize ("r_pub_1", - &r_pub->r_pub[1], - sizeof(struct GNUNET_CRYPTO_CsRPublic))); + TALER_JSON_pack_exchange_withdraw_values ("ewv", + &ewvs[i])); GNUNET_assert (NULL != csr_obj); GNUNET_assert (0 == json_array_append_new (csr_response_ewvs, |