diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-02-22 18:35:10 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-02-22 18:35:10 +0100 |
commit | 7910ca183f40a544dae4add5e7b5ff4775e65e12 (patch) | |
tree | c7ea92bc5f255c94f17e8359a2cc611c1b1ec872 /src/exchange/taler-exchange-httpd_responses.c | |
parent | fbdc1996a6166893415c59ed830e75a8ccf79a51 (diff) | |
download | exchange-7910ca183f40a544dae4add5e7b5ff4775e65e12.tar.gz exchange-7910ca183f40a544dae4add5e7b5ff4775e65e12.tar.bz2 exchange-7910ca183f40a544dae4add5e7b5ff4775e65e12.zip |
double melt test no works with age restriction
- added missing field h_age_commitment in exchange's error response
- slight refactoring
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 != |