From 7910ca183f40a544dae4add5e7b5ff4775e65e12 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Tue, 22 Feb 2022 18:35:10 +0100 Subject: double melt test no works with age restriction - added missing field h_age_commitment in exchange's error response - slight refactoring --- src/exchange/taler-exchange-httpd_responses.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/exchange/taler-exchange-httpd_responses.c') diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 9007e9d9f..d4da51621 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -111,6 +111,9 @@ TEH_RESPONSE_compile_transaction_history ( GNUNET_JSON_pack_data_auto ("h_denom_pub", &deposit->h_denom_pub), GNUNET_JSON_pack_allow_null ( + deposit->no_age_commitment ? + GNUNET_JSON_pack_string ( + "h_age_commitment", NULL) : GNUNET_JSON_pack_data_auto ("h_age_commitment", &deposit->h_age_commitment)), GNUNET_JSON_pack_data_auto ("coin_sig", @@ -146,7 +149,7 @@ TEH_RESPONSE_compile_transaction_history ( /* Age restriction is optional. We communicate a NULL value to * JSON_PACK below */ - if (! TALER_AgeCommitmentHash_isNullOrZero (&melt->h_age_commitment)) + if (! melt->no_age_commitment) phac = &melt->h_age_commitment; if (0 != -- cgit v1.2.3