summaryrefslogtreecommitdiff
path: root/src/lib/testing_auditor_api_cmd_deposit_confirmation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-18 13:20:43 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-18 13:20:43 +0200
commit30903b93866900e41bb4defa4d7b8ee49f3f3f99 (patch)
treea685970ab2930654da5578f1fece9567e91cffab /src/lib/testing_auditor_api_cmd_deposit_confirmation.c
parent6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 (diff)
downloadexchange-30903b93866900e41bb4defa4d7b8ee49f3f3f99.tar.gz
exchange-30903b93866900e41bb4defa4d7b8ee49f3f3f99.tar.bz2
exchange-30903b93866900e41bb4defa4d7b8ee49f3f3f99.zip
reduce code duplication
Diffstat (limited to 'src/lib/testing_auditor_api_cmd_deposit_confirmation.c')
-rw-r--r--src/lib/testing_auditor_api_cmd_deposit_confirmation.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/testing_auditor_api_cmd_deposit_confirmation.c b/src/lib/testing_auditor_api_cmd_deposit_confirmation.c
index 70fd01e1c..95871ef17 100644
--- a/src/lib/testing_auditor_api_cmd_deposit_confirmation.c
+++ b/src/lib/testing_auditor_api_cmd_deposit_confirmation.c
@@ -263,7 +263,23 @@ deposit_confirmation_run (void *cls,
GNUNET_assert (GNUNET_OK ==
TALER_string_to_amount (dcs->amount_without_fee,
&amount_without_fee));
-
+ {
+ struct GNUNET_JSON_Specification spec[] = {
+ GNUNET_JSON_spec_absolute_time ("timestamp", &timestamp),
+ GNUNET_JSON_spec_absolute_time ("refund_deadline", &refund_deadline),
+ GNUNET_JSON_spec_end()
+ };
+
+ if (GNUNET_OK !=
+ GNUNET_JSON_parse (contract_terms,
+ spec,
+ NULL, NULL))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return;
+ }
+ }
dcs->dc = TALER_AUDITOR_deposit_confirmation
(dcs->auditor,
&h_wire,