aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-11-03 06:59:38 +0100
committerChristian Grothoff <christian@grothoff.org>2024-11-05 10:37:37 +0100
commitf1767625194600dfd1428ae72832832dffc9f94f (patch)
tree8c35f6059981322efddba7562874d1570e39d9b6
parentce276176567ce728b8206dca3744be3729b7bc37 (diff)
fix bank-api
-rw-r--r--src/bank-lib/fakebank_tbi_post_withdrawal_operation.c10
-rw-r--r--src/bank-lib/fakebank_twg_admin_add_incoming.c10
-rw-r--r--src/bank-lib/fakebank_twg_admin_add_kycauth.c8
-rw-r--r--src/bank-lib/fakebank_twg_transfer.c10
4 files changed, 19 insertions, 19 deletions
diff --git a/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c b/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c
index 29f1e7475..cfef06455 100644
--- a/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c
+++ b/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2016-2023 Taler Systems SA
+ (C) 2016-2024 Taler Systems SA
TALER is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -50,7 +50,7 @@ do_post_withdrawal (
struct MHD_Connection *connection,
const char *wopid,
const struct TALER_ReservePublicKeyP *reserve_pub,
- const char *exchange_payto_uri,
+ const struct TALER_FullPayto exchange_payto_uri,
const struct TALER_Amount *amount)
{
struct WithdrawalOperation *wo;
@@ -233,7 +233,7 @@ TALER_FAKEBANK_tbi_post_withdrawal (
{
struct TALER_ReservePublicKeyP reserve_pub;
- const char *exchange_payto_url;
+ struct TALER_FullPayto exchange_payto_url;
enum GNUNET_GenericReturnValue ret;
struct TALER_Amount amount;
bool amount_missing;
@@ -241,8 +241,8 @@ TALER_FAKEBANK_tbi_post_withdrawal (
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("reserve_pub",
&reserve_pub),
- GNUNET_JSON_spec_string ("selected_exchange",
- &exchange_payto_url),
+ TALER_JSON_spec_full_payto_uri ("selected_exchange",
+ &exchange_payto_url),
GNUNET_JSON_spec_mark_optional (
TALER_JSON_spec_amount ("amount",
h->currency,
diff --git a/src/bank-lib/fakebank_twg_admin_add_incoming.c b/src/bank-lib/fakebank_twg_admin_add_incoming.c
index 2db4f1fe5..885fa2949 100644
--- a/src/bank-lib/fakebank_twg_admin_add_incoming.c
+++ b/src/bank-lib/fakebank_twg_admin_add_incoming.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2016-2023 Taler Systems SA
+ (C) 2016-2024 Taler Systems SA
TALER is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -74,7 +74,7 @@ TALER_FAKEBANK_twg_admin_add_incoming_ (
break;
}
{
- const char *debit_account;
+ struct TALER_FullPayto debit_account;
struct TALER_Amount amount;
struct TALER_ReservePublicKeyP reserve_pub;
char *debit;
@@ -82,8 +82,8 @@ TALER_FAKEBANK_twg_admin_add_incoming_ (
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("reserve_pub",
&reserve_pub),
- GNUNET_JSON_spec_string ("debit_account",
- &debit_account),
+ TALER_JSON_spec_full_payto_uri ("debit_account",
+ &debit_account),
TALER_JSON_spec_amount ("amount",
h->currency,
&amount),
@@ -120,7 +120,7 @@ TALER_FAKEBANK_twg_admin_add_incoming_ (
connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
- debit_account);
+ debit_account.full_payto);
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Receiving incoming wire transfer: %s->%s, subject: %s, amount: %s\n",
diff --git a/src/bank-lib/fakebank_twg_admin_add_kycauth.c b/src/bank-lib/fakebank_twg_admin_add_kycauth.c
index 7e0a47f87..07626e06e 100644
--- a/src/bank-lib/fakebank_twg_admin_add_kycauth.c
+++ b/src/bank-lib/fakebank_twg_admin_add_kycauth.c
@@ -75,7 +75,7 @@ TALER_FAKEBANK_twg_admin_add_kycauth_ (
break;
}
{
- const char *debit_account;
+ struct TALER_FullPayto debit_account;
struct TALER_Amount amount;
union TALER_AccountPublicKeyP account_pub;
char *debit;
@@ -83,8 +83,8 @@ TALER_FAKEBANK_twg_admin_add_kycauth_ (
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("account_pub",
&account_pub),
- GNUNET_JSON_spec_string ("debit_account",
- &debit_account),
+ TALER_JSON_spec_full_payto_uri ("debit_account",
+ &debit_account),
TALER_JSON_spec_amount ("amount",
h->currency,
&amount),
@@ -121,7 +121,7 @@ TALER_FAKEBANK_twg_admin_add_kycauth_ (
connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
- debit_account);
+ debit_account.full_payto);
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Receiving kycauth wire transfer: %s->%s, subject: %s, amount: %s\n",
diff --git a/src/bank-lib/fakebank_twg_transfer.c b/src/bank-lib/fakebank_twg_transfer.c
index 6a22c7dad..efdecb354 100644
--- a/src/bank-lib/fakebank_twg_transfer.c
+++ b/src/bank-lib/fakebank_twg_transfer.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2016-2023 Taler Systems SA
+ (C) 2016-2024 Taler Systems SA
TALER is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -88,7 +88,7 @@ TALER_FAKEBANK_handle_transfer_ (
{
struct GNUNET_HashCode uuid;
struct TALER_WireTransferIdentifierRawP wtid;
- const char *credit_account;
+ struct TALER_FullPayto credit_account;
char *credit;
const char *base_url;
struct TALER_Amount amount;
@@ -103,8 +103,8 @@ TALER_FAKEBANK_handle_transfer_ (
&base_url),
GNUNET_JSON_spec_fixed_auto ("wtid",
&wtid),
- GNUNET_JSON_spec_string ("credit_account",
- &credit_account),
+ TALER_JSON_spec_full_payto_uri ("credit_account",
+ &credit_account),
GNUNET_JSON_spec_end ()
};
@@ -125,7 +125,7 @@ TALER_FAKEBANK_handle_transfer_ (
connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
- credit_account);
+ credit_account.full_payto);
}
ret = TALER_FAKEBANK_make_transfer_ (h,
account,