exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 18541a284b57ed7f0c110f084649eb292e603e63
parent ac96733695ecc0ebe8e582e3230f2a95c89712bc
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  1 Aug 2021 19:18:31 +0200

-allow 0 for refund deadline

Diffstat:
Msrc/exchange/taler-exchange-httpd_deposit.c | 5+++--
Msrc/exchange/taler-exchange-httpd_responses.c | 5+++--
Msrc/lib/exchange_api_common.c | 5+++--
Msrc/lib/exchange_api_deposit.c | 5+++--
4 files changed, 12 insertions(+), 8 deletions(-)

diff --git 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 @@ -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", diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c @@ -527,8 +527,9 @@ TALER_EXCHANGE_verify_coin_history ( &dr.h_denom_pub), TALER_JSON_spec_absolute_time_nbo ("timestamp", &dr.wallet_timestamp), - TALER_JSON_spec_absolute_time_nbo ("refund_deadline", - &dr.refund_deadline), + GNUNET_JSON_spec_mark_optional ( + TALER_JSON_spec_absolute_time_nbo ("refund_deadline", + &dr.refund_deadline)), TALER_JSON_spec_amount_any_nbo ("deposit_fee", &dr.deposit_fee), GNUNET_JSON_spec_fixed_auto ("merchant_pub", diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c @@ -680,8 +680,9 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange, timestamp), GNUNET_JSON_pack_data_auto ("merchant_pub", merchant_pub), - GNUNET_JSON_pack_time_abs ("refund_deadline", - refund_deadline), + GNUNET_JSON_pack_allow_null ( + GNUNET_JSON_pack_time_abs ("refund_deadline", + refund_deadline)), GNUNET_JSON_pack_time_abs ("wire_transfer_deadline", wire_deadline), GNUNET_JSON_pack_data_auto ("coin_sig",