diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 19:18:31 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 19:18:35 +0200 |
commit | 18541a284b57ed7f0c110f084649eb292e603e63 (patch) | |
tree | e00abc102486ad4164742ea3205cb04d8419a51f | |
parent | ac96733695ecc0ebe8e582e3230f2a95c89712bc (diff) | |
download | exchange-18541a284b57ed7f0c110f084649eb292e603e63.tar.gz exchange-18541a284b57ed7f0c110f084649eb292e603e63.zip |
-allow 0 for refund deadline
-rw-r--r-- | src/exchange/taler-exchange-httpd_deposit.c | 5 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 5 | ||||
-rw-r--r-- | src/lib/exchange_api_common.c | 5 | ||||
-rw-r--r-- | src/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 index ba94f25d6..398b3785e 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, | |||
347 | &deposit.csig), | 347 | &deposit.csig), |
348 | TALER_JSON_spec_absolute_time ("timestamp", | 348 | TALER_JSON_spec_absolute_time ("timestamp", |
349 | &deposit.timestamp), | 349 | &deposit.timestamp), |
350 | TALER_JSON_spec_absolute_time ("refund_deadline", | 350 | GNUNET_JSON_spec_mark_optional ( |
351 | &deposit.refund_deadline), | 351 | TALER_JSON_spec_absolute_time ("refund_deadline", |
352 | &deposit.refund_deadline)), | ||
352 | TALER_JSON_spec_absolute_time ("wire_transfer_deadline", | 353 | TALER_JSON_spec_absolute_time ("wire_transfer_deadline", |
353 | &deposit.wire_deadline), | 354 | &deposit.wire_deadline), |
354 | GNUNET_JSON_spec_end () | 355 | GNUNET_JSON_spec_end () |
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 72d1ddb75..66da12166 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 ( | |||
103 | &deposit->deposit_fee), | 103 | &deposit->deposit_fee), |
104 | GNUNET_JSON_pack_time_abs ("timestamp", | 104 | GNUNET_JSON_pack_time_abs ("timestamp", |
105 | deposit->timestamp), | 105 | deposit->timestamp), |
106 | GNUNET_JSON_pack_time_abs ("refund_deadline", | 106 | GNUNET_JSON_pack_allow_null ( |
107 | deposit->refund_deadline), | 107 | GNUNET_JSON_pack_time_abs ("refund_deadline", |
108 | deposit->refund_deadline)), | ||
108 | GNUNET_JSON_pack_data_auto ("merchant_pub", | 109 | GNUNET_JSON_pack_data_auto ("merchant_pub", |
109 | &deposit->merchant_pub), | 110 | &deposit->merchant_pub), |
110 | GNUNET_JSON_pack_data_auto ("h_contract_terms", | 111 | GNUNET_JSON_pack_data_auto ("h_contract_terms", |
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c index a564a367c..da1400b9d 100644 --- a/src/lib/exchange_api_common.c +++ b/src/lib/exchange_api_common.c | |||
@@ -527,8 +527,9 @@ TALER_EXCHANGE_verify_coin_history ( | |||
527 | &dr.h_denom_pub), | 527 | &dr.h_denom_pub), |
528 | TALER_JSON_spec_absolute_time_nbo ("timestamp", | 528 | TALER_JSON_spec_absolute_time_nbo ("timestamp", |
529 | &dr.wallet_timestamp), | 529 | &dr.wallet_timestamp), |
530 | TALER_JSON_spec_absolute_time_nbo ("refund_deadline", | 530 | GNUNET_JSON_spec_mark_optional ( |
531 | &dr.refund_deadline), | 531 | TALER_JSON_spec_absolute_time_nbo ("refund_deadline", |
532 | &dr.refund_deadline)), | ||
532 | TALER_JSON_spec_amount_any_nbo ("deposit_fee", | 533 | TALER_JSON_spec_amount_any_nbo ("deposit_fee", |
533 | &dr.deposit_fee), | 534 | &dr.deposit_fee), |
534 | GNUNET_JSON_spec_fixed_auto ("merchant_pub", | 535 | GNUNET_JSON_spec_fixed_auto ("merchant_pub", |
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c index f22ae0df7..86f5034aa 100644 --- 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, | |||
680 | timestamp), | 680 | timestamp), |
681 | GNUNET_JSON_pack_data_auto ("merchant_pub", | 681 | GNUNET_JSON_pack_data_auto ("merchant_pub", |
682 | merchant_pub), | 682 | merchant_pub), |
683 | GNUNET_JSON_pack_time_abs ("refund_deadline", | 683 | GNUNET_JSON_pack_allow_null ( |
684 | refund_deadline), | 684 | GNUNET_JSON_pack_time_abs ("refund_deadline", |
685 | refund_deadline)), | ||
685 | GNUNET_JSON_pack_time_abs ("wire_transfer_deadline", | 686 | GNUNET_JSON_pack_time_abs ("wire_transfer_deadline", |
686 | wire_deadline), | 687 | wire_deadline), |
687 | GNUNET_JSON_pack_data_auto ("coin_sig", | 688 | GNUNET_JSON_pack_data_auto ("coin_sig", |