summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 19:18:31 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 19:18:35 +0200
commit18541a284b57ed7f0c110f084649eb292e603e63 (patch)
treee00abc102486ad4164742ea3205cb04d8419a51f /src/exchange
parentac96733695ecc0ebe8e582e3230f2a95c89712bc (diff)
downloadexchange-18541a284b57ed7f0c110f084649eb292e603e63.tar.gz
exchange-18541a284b57ed7f0c110f084649eb292e603e63.tar.bz2
exchange-18541a284b57ed7f0c110f084649eb292e603e63.zip
-allow 0 for refund deadline
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd_deposit.c5
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c
index ba94f25d..398b3785 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -347,8 +347,9 @@ TEH_handler_deposit (struct MHD_Connection *connection,
&deposit.csig),
TALER_JSON_spec_absolute_time ("timestamp",
&deposit.timestamp),
- TALER_JSON_spec_absolute_time ("refund_deadline",
- &deposit.refund_deadline),
+ GNUNET_JSON_spec_mark_optional (
+ TALER_JSON_spec_absolute_time ("refund_deadline",
+ &deposit.refund_deadline)),
TALER_JSON_spec_absolute_time ("wire_transfer_deadline",
&deposit.wire_deadline),
GNUNET_JSON_spec_end ()
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 72d1ddb7..66da1216 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -103,8 +103,9 @@ TEH_RESPONSE_compile_transaction_history (
&deposit->deposit_fee),
GNUNET_JSON_pack_time_abs ("timestamp",
deposit->timestamp),
- GNUNET_JSON_pack_time_abs ("refund_deadline",
- deposit->refund_deadline),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_time_abs ("refund_deadline",
+ deposit->refund_deadline)),
GNUNET_JSON_pack_data_auto ("merchant_pub",
&deposit->merchant_pub),
GNUNET_JSON_pack_data_auto ("h_contract_terms",