[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 95/130: expose KYC traits for withdraw/get deposits com
From: |
gnunet |
Subject: |
[taler-exchange] 95/130: expose KYC traits for withdraw/get deposits commands |
Date: |
Wed, 17 Nov 2021 12:25:43 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 659cd4439d03f7a2a5617f91dc90554b3c5ee2b6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Nov 7 14:12:54 2021 +0100
expose KYC traits for withdraw/get deposits commands
---
src/include/taler_testing_lib.h | 1 +
src/testing/testing_api_cmd_deposits_get.c | 8 ++++++++
src/testing/testing_api_cmd_withdraw.c | 11 +++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index c5530f0f..65f4e40a 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -2368,6 +2368,7 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait
*traits,
op (taler_uri, const char *) \
op (payto_uri, const char *) \
op (row, const uint64_t) \
+ op (payment_target_uuid, const uint64_t) \
op (array_length, const unsigned int) \
op (credit_payto_uri, const char *) \
op (debit_payto_uri, const char *) \
diff --git a/src/testing/testing_api_cmd_deposits_get.c
b/src/testing/testing_api_cmd_deposits_get.c
index 389d4660..df505044 100644
--- a/src/testing/testing_api_cmd_deposits_get.c
+++ b/src/testing/testing_api_cmd_deposits_get.c
@@ -49,6 +49,12 @@ struct TrackTransactionState
*/
unsigned int expected_response_code;
+ /**
+ * Set to the KYC UUID *if* the exchange replied with
+ * a request for KYC (#MHD_HTTP_ACCEPTED).
+ */
+ uint64_t kyc_uuid;
+
/**
* Reference to any operation that can provide a transaction.
* Will be the transaction to track.
@@ -147,6 +153,7 @@ deposit_wtid_cb (void *cls,
break;
case MHD_HTTP_ACCEPTED:
/* allowed, nothing to check here */
+ tts->kyc_uuid = dr->details.accepted.payment_target_uuid;
break;
case MHD_HTTP_NOT_FOUND:
/* allowed, nothing to check here */
@@ -306,6 +313,7 @@ track_transaction_traits (void *cls,
struct TrackTransactionState *tts = cls;
struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_wtid (&tts->wtid),
+ TALER_TESTING_make_trait_payment_target_uuid (&tts->kyc_uuid),
TALER_TESTING_trait_end ()
};
diff --git a/src/testing/testing_api_cmd_withdraw.c
b/src/testing/testing_api_cmd_withdraw.c
index aa77cb1e..a9c599a4 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -126,6 +126,12 @@ struct WithdrawState
*/
struct GNUNET_TIME_Relative total_backoff;
+ /**
+ * Set to the KYC UUID *if* the exchange replied with
+ * a request for KYC.
+ */
+ uint64_t kyc_uuid;
+
/**
* Expected HTTP response code to the request.
*/
@@ -253,7 +259,7 @@ reserve_withdraw_cb (void *cls,
break;
case MHD_HTTP_ACCEPTED:
/* nothing to check */
- /* TODO: trait for returned uuid! */
+ ws->kyc_uuid = wr->details.accepted.payment_target_uuid;
break;
case MHD_HTTP_FORBIDDEN:
/* nothing to check */
@@ -287,7 +293,7 @@ reserve_withdraw_cb (void *cls,
* @param[out] idx where we set $INDEX
* @return #GNUNET_SYSERR if $INDEX is present but not numeric
*/
-static int
+static enum GNUNET_GenericReturnValue
parse_coin_reference (const char *coin_reference,
char **cref,
unsigned int *idx)
@@ -528,6 +534,7 @@ withdraw_traits (void *cls,
TALER_TESTING_make_trait_reserve_priv (reserve_priv),
TALER_TESTING_make_trait_reserve_pub (reserve_pub),
TALER_TESTING_make_trait_amount (&ws->amount),
+ TALER_TESTING_make_trait_payment_target_uuid (&ws->kyc_uuid),
TALER_TESTING_make_trait_exchange_url (
(const char **) &ws->exchange_url),
TALER_TESTING_trait_end ()
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] 45/130: fix SQL, (continued)
- [taler-exchange] 45/130: fix SQL, gnunet, 2021/11/17
- [taler-exchange] 48/130: fix more FTBFS issues, gnunet, 2021/11/17
- [taler-exchange] 56/130: SQL fixes, gnunet, 2021/11/17
- [taler-exchange] 27/130: eliminate HKDF when hashing paytos, gnunet, 2021/11/17
- [taler-exchange] 61/130: -fix, gnunet, 2021/11/17
- [taler-exchange] 16/130: -fix more FTBFS issues, gnunet, 2021/11/17
- [taler-exchange] 18/130: -fix misc FTBFS, gnunet, 2021/11/17
- [taler-exchange] 126/130: -bump version, gnunet, 2021/11/17
- [taler-exchange] 33/130: -work on testing FTBFS, gnunet, 2021/11/17
- [taler-exchange] 68/130: -code cleanup, gnunet, 2021/11/17
- [taler-exchange] 95/130: expose KYC traits for withdraw/get deposits commands,
gnunet <=
- [taler-exchange] 111/130: -fixes for test, gnunet, 2021/11/17
- [taler-exchange] 75/130: more RSA abstraction work, gnunet, 2021/11/17
- [taler-exchange] 31/130: the big macrofication of the traits, gnunet, 2021/11/17
- [taler-exchange] 82/130: introduce TALER_wallet_deposit_verify, gnunet, 2021/11/17
- [taler-exchange] 114/130: -better types, gnunet, 2021/11/17
- [taler-exchange] 102/130: add oauth service faker, gnunet, 2021/11/17
- [taler-exchange] 62/130: -disable tests, gnunet, 2021/11/17
- [taler-exchange] 59/130: -fix tests, gnunet, 2021/11/17
- [taler-exchange] 14/130: -fixing FTBFS, gnunet, 2021/11/17
- [taler-exchange] 57/130: DB test passes again, gnunet, 2021/11/17