aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-10-14 20:10:06 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-10-14 20:10:06 +0200
commit63b19fad0cbcafa340d3344c9dc33c06402371a6 (patch)
tree2d96278051f09dcead1c6470e1258d3bdb7d6bde /src/exchange/taler-exchange-httpd_responses.c
parent29e5cd0ef5e53cfdb39f4dd5b43902c2b63571e5 (diff)
simplify datastructures
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c6
1 files changed, 5 insertions, 1 deletions
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,
@@ -111,6 +111,10 @@ TEH_RESPONSE_compile_transaction_history (
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 (
"h_age_commitment", NULL) :