aboutsummaryrefslogtreecommitdiff
path: root/src/lib/auditor_api_deposit_confirmation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/auditor_api_deposit_confirmation.c')
-rw-r--r--src/lib/auditor_api_deposit_confirmation.c62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/lib/auditor_api_deposit_confirmation.c b/src/lib/auditor_api_deposit_confirmation.c
index eb84aeadc..2afbfd1e9 100644
--- a/src/lib/auditor_api_deposit_confirmation.c
+++ b/src/lib/auditor_api_deposit_confirmation.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of TALER 2 This file is part of TALER
3 Copyright (C) 2014-2020 Taler Systems SA 3 Copyright (C) 2014-2021 Taler Systems SA
4 4
5 TALER is free software; you can redistribute it and/or modify it under the 5 TALER is free software; you can redistribute it and/or modify it under the
6 terms of the GNU General Public License as published by the Free Software 6 terms of the GNU General Public License as published by the Free Software
@@ -323,37 +323,35 @@ TALER_AUDITOR_deposit_confirmation (
323 } 323 }
324 324
325 deposit_confirmation_obj 325 deposit_confirmation_obj
326 = json_pack ("{s:o, s:o," /* h_wire, h_contract_terms */ 326 = GNUNET_JSON_PACK (
327 " s:o, s:o," /* timestamp, refund_deadline */ 327 GNUNET_JSON_pack_data_auto ("h_wire",
328 " s:o, s:o," /* amount_without_fees, coin_pub */ 328 h_wire),
329 " s:o, s:o," /* merchant_pub, exchange_sig */ 329 GNUNET_JSON_pack_data_auto ("h_contract_terms",
330 " s:o, s:o," /* master_pub, ep_start */ 330 h_contract_terms),
331 " s:o, s:o," /* ep_expire, ep_end */ 331 GNUNET_JSON_pack_time_abs ("exchange_timestamp",
332 " s:o, s:o}", /* master_sig, exchange_pub */ 332 exchange_timestamp),
333 "h_wire", GNUNET_JSON_from_data_auto (h_wire), 333 GNUNET_JSON_pack_time_abs ("refund_deadline",
334 "h_contract_terms", GNUNET_JSON_from_data_auto ( 334 refund_deadline),
335 h_contract_terms), 335 TALER_JSON_pack_amount ("amount_without_fee",
336 "exchange_timestamp", GNUNET_JSON_from_time_abs ( 336 amount_without_fee),
337 exchange_timestamp), 337 GNUNET_JSON_pack_data_auto ("coin_pub",
338 "refund_deadline", GNUNET_JSON_from_time_abs (refund_deadline), 338 coin_pub),
339 "amount_without_fee", TALER_JSON_from_amount ( 339 GNUNET_JSON_pack_data_auto ("merchant_pub",
340 amount_without_fee), 340 merchant_pub),
341 "coin_pub", GNUNET_JSON_from_data_auto (coin_pub), 341 GNUNET_JSON_pack_data_auto ("exchange_sig",
342 "merchant_pub", GNUNET_JSON_from_data_auto (merchant_pub), 342 exchange_sig),
343 "exchange_sig", GNUNET_JSON_from_data_auto (exchange_sig), 343 GNUNET_JSON_pack_data_auto ("master_pub",
344 "master_pub", GNUNET_JSON_from_data_auto (master_pub), 344 master_pub),
345 "ep_start", GNUNET_JSON_from_time_abs (ep_start), 345 GNUNET_JSON_pack_time_abs ("ep_start",
346 "ep_expire", GNUNET_JSON_from_time_abs (ep_expire), 346 ep_start),
347 "ep_end", GNUNET_JSON_from_time_abs (ep_end), 347 GNUNET_JSON_pack_time_abs ("ep_expire",
348 "master_sig", GNUNET_JSON_from_data_auto (master_sig), 348 ep_expire),
349 "exchange_pub", GNUNET_JSON_from_data_auto (exchange_pub)); 349 GNUNET_JSON_pack_time_abs ("ep_end",
350 350 ep_end),
351 if (NULL == deposit_confirmation_obj) 351 GNUNET_JSON_pack_data_auto ("master_sig",
352 { 352 master_sig),
353 GNUNET_break (0); 353 GNUNET_JSON_pack_data_auto ("exchange_pub",
354 return NULL; 354 exchange_pub));
355 }
356
357 dh = GNUNET_new (struct TALER_AUDITOR_DepositConfirmationHandle); 355 dh = GNUNET_new (struct TALER_AUDITOR_DepositConfirmationHandle);
358 dh->auditor = auditor; 356 dh->auditor = auditor;
359 dh->cb = cb; 357 dh->cb = cb;