-refund deadline should be optional/can be 0

This commit is contained in:
Christian Grothoff 2023-02-02 22:21:44 +01:00
parent a703171f08
commit ba3b53cd27
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 10 additions and 5 deletions

View File

@ -271,7 +271,9 @@ TAH_DEPOSIT_CONFIRMATION_handler (struct TAH_RequestHandler *rh,
const char *upload_data, const char *upload_data,
size_t *upload_data_size) size_t *upload_data_size)
{ {
struct TALER_AUDITORDB_DepositConfirmation dc; struct TALER_AUDITORDB_DepositConfirmation dc = {
.refund_deadline = GNUNET_TIME_UNIT_ZERO_TS
};
struct TALER_AUDITORDB_ExchangeSigningKey es; struct TALER_AUDITORDB_ExchangeSigningKey es;
struct GNUNET_JSON_Specification spec[] = { struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("h_contract_terms", GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
@ -282,8 +284,10 @@ TAH_DEPOSIT_CONFIRMATION_handler (struct TAH_RequestHandler *rh,
&dc.h_wire), &dc.h_wire),
GNUNET_JSON_spec_timestamp ("exchange_timestamp", GNUNET_JSON_spec_timestamp ("exchange_timestamp",
&dc.exchange_timestamp), &dc.exchange_timestamp),
GNUNET_JSON_spec_timestamp ("refund_deadline", GNUNET_JSON_spec_mark_optional (
&dc.refund_deadline), GNUNET_JSON_spec_timestamp ("refund_deadline",
&dc.refund_deadline),
NULL),
GNUNET_JSON_spec_timestamp ("wire_deadline", GNUNET_JSON_spec_timestamp ("wire_deadline",
&dc.wire_deadline), &dc.wire_deadline),
TALER_JSON_spec_amount ("amount_without_fee", TALER_JSON_spec_amount ("amount_without_fee",

View File

@ -296,8 +296,9 @@ TALER_AUDITOR_deposit_confirmation (
h_contract_terms), h_contract_terms),
GNUNET_JSON_pack_timestamp ("exchange_timestamp", GNUNET_JSON_pack_timestamp ("exchange_timestamp",
exchange_timestamp), exchange_timestamp),
GNUNET_JSON_pack_timestamp ("refund_deadline", GNUNET_JSON_pack_allow_null (
refund_deadline), GNUNET_JSON_pack_timestamp ("refund_deadline",
refund_deadline)),
GNUNET_JSON_pack_timestamp ("wire_deadline", GNUNET_JSON_pack_timestamp ("wire_deadline",
wire_deadline), wire_deadline),
TALER_JSON_pack_amount ("amount_without_fee", TALER_JSON_pack_amount ("amount_without_fee",