diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-10-12 22:10:00 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-10-12 22:10:00 +0200 |
commit | 0cd18a0f8f2545eb1212c504683a8a70007caa48 (patch) | |
tree | b0b484085308961f44622c319209792589c21543 /src/bank-lib | |
parent | 5b1fc2a9765465cf374b2feb7419a0e5200e4411 (diff) | |
download | exchange-0cd18a0f8f2545eb1212c504683a8a70007caa48.tar.gz exchange-0cd18a0f8f2545eb1212c504683a8a70007caa48.tar.bz2 exchange-0cd18a0f8f2545eb1212c504683a8a70007caa48.zip |
clean up bank API, get test_bank_api_with_nexus to finally pass
Diffstat (limited to 'src/bank-lib')
-rw-r--r-- | src/bank-lib/bank_api_credit.c | 4 | ||||
-rw-r--r-- | src/bank-lib/bank_api_debit.c | 4 | ||||
-rw-r--r-- | src/bank-lib/taler-exchange-wire-gateway-client.c | 8 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/bank-lib/bank_api_credit.c b/src/bank-lib/bank_api_credit.c index 9ed8a2314..124415b80 100644 --- a/src/bank-lib/bank_api_credit.c +++ b/src/bank-lib/bank_api_credit.c @@ -83,12 +83,11 @@ parse_account_history (struct TALER_BANK_CreditHistoryHandle *hh, .response = history }; const json_t *history_array; - const char *credit_account_uri; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_array_const ("incoming_transactions", &history_array), GNUNET_JSON_spec_string ("credit_account", - &credit_account_uri), + &chr.details.ok.credit_account_uri), GNUNET_JSON_spec_end () }; @@ -134,7 +133,6 @@ parse_account_history (struct TALER_BANK_CreditHistoryHandle *hh, GNUNET_break_op (0); return GNUNET_SYSERR; } - td->credit_account_uri = credit_account_uri; } chr.details.ok.details_length = len; chr.details.ok.details = cd; diff --git a/src/bank-lib/bank_api_debit.c b/src/bank-lib/bank_api_debit.c index f3c69ce3a..58dc0a736 100644 --- a/src/bank-lib/bank_api_debit.c +++ b/src/bank-lib/bank_api_debit.c @@ -82,13 +82,12 @@ parse_account_history (struct TALER_BANK_DebitHistoryHandle *hh, .ec = TALER_EC_NONE, .response = history }; - const char *debit_account_uri; const json_t *history_array; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_array_const ("outgoing_transactions", &history_array), GNUNET_JSON_spec_string ("debit_account", - &debit_account_uri), + &dhr.details.ok.debit_account_uri), GNUNET_JSON_spec_end () }; @@ -136,7 +135,6 @@ parse_account_history (struct TALER_BANK_DebitHistoryHandle *hh, GNUNET_break_op (0); return GNUNET_SYSERR; } - td->debit_account_uri = debit_account_uri; } dhr.details.ok.details_length = len; dhr.details.ok.details = dd; diff --git a/src/bank-lib/taler-exchange-wire-gateway-client.c b/src/bank-lib/taler-exchange-wire-gateway-client.c index b20a5fd32..b0d387b71 100644 --- a/src/bank-lib/taler-exchange-wire-gateway-client.c +++ b/src/bank-lib/taler-exchange-wire-gateway-client.c @@ -187,7 +187,7 @@ credit_history_cb (void *cls, /* If credit/debit accounts were specified, use as a filter */ if ( (NULL != credit_account) && (0 != strcasecmp (credit_account, - cd->credit_account_uri) ) ) + reply->details.ok.credit_account_uri) ) ) continue; if ( (NULL != debit_account) && (0 != strcasecmp (debit_account, @@ -197,7 +197,7 @@ credit_history_cb (void *cls, "%llu: %s->%s (%s) over %s at %s\n", (unsigned long long) cd->serial_id, cd->debit_account_uri, - cd->credit_account_uri, + reply->details.ok.credit_account_uri, TALER_B2S (&cd->reserve_pub), TALER_amount2s (&cd->amount), GNUNET_TIME_timestamp2s (cd->execution_date)); @@ -291,12 +291,12 @@ debit_history_cb (void *cls, continue; if ( (NULL != debit_account) && (0 != strcasecmp (debit_account, - dd->debit_account_uri) ) ) + reply->details.ok.debit_account_uri) ) ) continue; fprintf (stdout, "%llu: %s->%s (%s) over %s at %s\n", (unsigned long long) dd->serial_id, - dd->debit_account_uri, + reply->details.ok.debit_account_uri, dd->credit_account_uri, TALER_B2S (&dd->wtid), TALER_amount2s (&dd->amount), |