summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_withdraw.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-07 14:12:54 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-07 14:12:54 +0100
commit659cd4439d03f7a2a5617f91dc90554b3c5ee2b6 (patch)
tree98b943d01e6a689e715acc03f634fb993d433226 /src/testing/testing_api_cmd_withdraw.c
parent121bfe3659c988f0aab070b3ae291b7b6f13f8f7 (diff)
downloadexchange-659cd4439d03f7a2a5617f91dc90554b3c5ee2b6.tar.gz
exchange-659cd4439d03f7a2a5617f91dc90554b3c5ee2b6.tar.bz2
exchange-659cd4439d03f7a2a5617f91dc90554b3c5ee2b6.zip
expose KYC traits for withdraw/get deposits commands
Diffstat (limited to 'src/testing/testing_api_cmd_withdraw.c')
-rw-r--r--src/testing/testing_api_cmd_withdraw.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index aa77cb1e1..a9c599a40 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -127,6 +127,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.
*/
unsigned int expected_response_code;
@@ -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 ()