From 63b19fad0cbcafa340d3344c9dc33c06402371a6 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Fri, 14 Oct 2022 20:10:06 +0200 Subject: simplify datastructures --- src/exchange/taler-exchange-httpd_responses.c | 6 +++++- 1 file changed, 5 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 fb6bc21d..90284300 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -76,7 +76,7 @@ TEH_RESPONSE_compile_transaction_history ( &h_wire, &deposit->h_contract_terms, &deposit->h_age_commitment, - &deposit->h_policy, + (deposit->has_policy) ? &deposit->h_policy : NULL, &deposit->h_denom_pub, deposit->timestamp, &deposit->merchant_pub, @@ -110,6 +110,10 @@ TEH_RESPONSE_compile_transaction_history ( &deposit->h_contract_terms), GNUNET_JSON_pack_data_auto ("h_wire", &h_wire), + GNUNET_JSON_pack_allow_null ( + GNUNET_JSON_pack_data_auto ( + "h_policy", + ((deposit->has_policy) ? &deposit->h_policy : NULL))), GNUNET_JSON_pack_allow_null ( deposit->no_age_commitment ? GNUNET_JSON_pack_string ( -- cgit v1.2.3