diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-18 13:20:43 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-18 13:20:43 +0200 |
commit | 30903b93866900e41bb4defa4d7b8ee49f3f3f99 (patch) | |
tree | a685970ab2930654da5578f1fece9567e91cffab /src/lib/testing_auditor_api_cmd_deposit_confirmation.c | |
parent | 6066ffcb9b07f9e2709d0382afa3fc05c52e21c7 (diff) | |
download | exchange-30903b93866900e41bb4defa4d7b8ee49f3f3f99.tar.xz |
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.c | 18 |
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", ×tamp), + 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, |