aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_common.c2
-rw-r--r--src/lib/testing_api_cmd_refresh.c7
-rw-r--r--src/lib/testing_auditor_api_cmd_deposit_confirmation.c18
3 files changed, 22 insertions, 5 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index a9c6e16cf..72eb9ace5 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -42,7 +42,6 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
struct TALER_Amount *total)
{
size_t len;
- int add;
struct TALER_Amount rtotal;
if (NULL == history)
@@ -64,6 +63,7 @@ TALER_EXCHANGE_verify_coin_history (const char *currency,
&rtotal));
for (size_t off=0;off<len;off++)
{
+ int add;
json_t *transaction;
struct TALER_Amount amount;
const char *type;
diff --git a/src/lib/testing_api_cmd_refresh.c b/src/lib/testing_api_cmd_refresh.c
index ec8855810..d0b589b12 100644
--- a/src/lib/testing_api_cmd_refresh.c
+++ b/src/lib/testing_api_cmd_refresh.c
@@ -873,12 +873,10 @@ refresh_melt_run (void *cls,
{
struct RefreshMeltState *rms = cls;
unsigned int num_fresh_coins;
- const struct TALER_TESTING_Command *coin_command;
/* FIXME: this should be dynamic */
const char *melt_fresh_amounts[] = {
"EUR:1", "EUR:1", "EUR:1", "EUR:0.1",
NULL};
- const struct TALER_EXCHANGE_DenomPublicKey *fresh_pk;
rms->is = is;
rms->noreveal_index = UINT16_MAX;
@@ -895,8 +893,9 @@ refresh_melt_run (void *cls,
struct TALER_Amount fresh_amount;
const struct TALER_DenominationSignature *melt_sig;
const struct TALER_EXCHANGE_DenomPublicKey *melt_denom_pub;
-
+ const struct TALER_TESTING_Command *coin_command;
const struct MeltDetails *md = &rms->melted_coin;
+
if (NULL == (coin_command
= TALER_TESTING_interpreter_lookup_command
(is, md->coin_reference)))
@@ -945,6 +944,8 @@ refresh_melt_run (void *cls,
for (unsigned int i=0;i<num_fresh_coins;i++)
{
+ const struct TALER_EXCHANGE_DenomPublicKey *fresh_pk;
+
if (GNUNET_OK != TALER_string_to_amount
(melt_fresh_amounts[i], &fresh_amount))
{
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,