aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_csr.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-03-11 11:51:02 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-03-11 11:51:02 +0100
commit777a4c07cfa0eadfa37caaa6e100275bb21affaa (patch)
treead3c2f79102f5a825f9b89b2ba7ac73717bedb5a /src/exchange/taler-exchange-httpd_csr.c
parente3d5672cbd8fdcbc7df9c52f90b7d639ad1675d9 (diff)
parentce71db2c0b1a8dcc3021d2ba8549c31501c098b2 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/exchange/taler-exchange-httpd_csr.c')
-rw-r--r--src/exchange/taler-exchange-httpd_csr.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/exchange/taler-exchange-httpd_csr.c b/src/exchange/taler-exchange-httpd_csr.c
index a22fdfff..29f83c2c 100644
--- a/src/exchange/taler-exchange-httpd_csr.c
+++ b/src/exchange/taler-exchange-httpd_csr.c
@@ -234,12 +234,10 @@ TEH_handler_csr_withdraw (struct TEH_RequestContext *rc,
.cipher = TALER_DENOMINATION_CS
};
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_fixed ("nonce",
- &nonce,
- sizeof (struct TALER_CsNonce)),
- GNUNET_JSON_spec_fixed ("denom_pub_hash",
- &denom_pub_hash,
- sizeof (struct TALER_DenominationHashP)),
+ GNUNET_JSON_spec_fixed_auto ("nonce",
+ &nonce),
+ GNUNET_JSON_spec_fixed_auto ("denom_pub_hash",
+ &denom_pub_hash),
GNUNET_JSON_spec_end ()
};
struct TEH_DenominationKey *dk;
@@ -333,17 +331,11 @@ TEH_handler_csr_withdraw (struct TEH_RequestContext *rc,
}
}
- {
- json_t *csr_obj;
-
- csr_obj = GNUNET_JSON_PACK (
- TALER_JSON_pack_exchange_withdraw_values ("ewv",
- &ewv));
- GNUNET_assert (NULL != csr_obj);
- return TALER_MHD_reply_json_steal (rc->connection,
- csr_obj,
- MHD_HTTP_OK);
- }
+ return TALER_MHD_REPLY_JSON_PACK (
+ rc->connection,
+ MHD_HTTP_OK,
+ TALER_JSON_pack_exchange_withdraw_values ("ewv",
+ &ewv));
}