summaryrefslogtreecommitdiff
path: root/src/bank-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-16 15:06:09 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-16 15:06:16 +0100
commit14ab704cde389ae8eea94f08f29ac3af955729c9 (patch)
tree6772dce9df0c675105b14b51aa8617050d851f7c /src/bank-lib
parent1fc8fd22dc417f151e28a63dfc6fd58cf4b10b2e (diff)
downloadexchange-14ab704cde389ae8eea94f08f29ac3af955729c9.tar.gz
exchange-14ab704cde389ae8eea94f08f29ac3af955729c9.tar.bz2
exchange-14ab704cde389ae8eea94f08f29ac3af955729c9.zip
fix fakebank logic
Diffstat (limited to 'src/bank-lib')
-rw-r--r--src/bank-lib/bank_api_debit.c13
-rw-r--r--src/bank-lib/fakebank.c2
2 files changed, 4 insertions, 11 deletions
diff --git a/src/bank-lib/bank_api_debit.c b/src/bank-lib/bank_api_debit.c
index ea3ddeebc..5688d4772 100644
--- a/src/bank-lib/bank_api_debit.c
+++ b/src/bank-lib/bank_api_debit.c
@@ -41,11 +41,6 @@ struct TALER_BANK_DebitHistoryHandle
char *request_url;
/**
- * The base URL of the bank.
- */
- char *bank_base_url;
-
- /**
* Handle for the request.
*/
struct GNUNET_CURL_Job *job;
@@ -220,7 +215,7 @@ handle_history_finished (void *cls,
* Request the debit history of the exchange's bank account.
*
* @param ctx curl context for the event loop
- * @param bank_base_url URL of the base INCLUDING account number
+ * @param account_base_url URL of the base INCLUDING account number
* @param auth authentication data to use
* @param start_row from which row on do we want to get results,
* use UINT64_MAX for the latest; exclusive
@@ -237,7 +232,7 @@ handle_history_finished (void *cls,
*/
struct TALER_BANK_DebitHistoryHandle *
TALER_BANK_debit_history (struct GNUNET_CURL_Context *ctx,
- const char *bank_base_url,
+ const char *account_base_url,
const struct TALER_BANK_AuthenticationData *auth,
uint64_t start_row,
int64_t num_results,
@@ -269,8 +264,7 @@ TALER_BANK_debit_history (struct GNUNET_CURL_Context *ctx,
hh = GNUNET_new (struct TALER_BANK_DebitHistoryHandle);
hh->hcb = hres_cb;
hh->hcb_cls = hres_cb_cls;
- hh->bank_base_url = GNUNET_strdup (bank_base_url);
- hh->request_url = TALER_BANK_path_to_url_ (bank_base_url,
+ hh->request_url = TALER_BANK_path_to_url_ (account_base_url,
url);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -317,7 +311,6 @@ TALER_BANK_debit_history_cancel (struct TALER_BANK_DebitHistoryHandle *hh)
hh->job = NULL;
}
GNUNET_free (hh->request_url);
- GNUNET_free (hh->bank_base_url);
GNUNET_free (hh);
}
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 2286d8ec1..15b21ba39 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -951,7 +951,7 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
char *debit_payto;
credit_payto = TALER_payto_xtalerbank_make (h->my_baseurl,
- account);
+ pos->credit_account);
debit_payto = TALER_payto_xtalerbank_make (h->my_baseurl,
pos->debit_account);
trans = json_pack