summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_do_withdraw.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-07-23 21:18:32 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-07-23 21:18:32 +0200
commit5bf90c3505130bb92d518e8ae489d55095cb1cf3 (patch)
tree27bd1a47fd29043c4472e26505d213dbc103e284 /src/exchangedb/pg_do_withdraw.h
parente230eaad76f4488dc1b5dbc0aba6ab26b9423e75 (diff)
downloadexchange-5bf90c3505130bb92d518e8ae489d55095cb1cf3.tar.gz
exchange-5bf90c3505130bb92d518e8ae489d55095cb1cf3.tar.bz2
exchange-5bf90c3505130bb92d518e8ae489d55095cb1cf3.zip
kyc logic with birthdate setting test added
1. Added age-requirement check in withdraw-handler (like in batch-withdraw) 2. In test_exchange_api_age_restriction: - kyc-oauth2 started, with static birthdate in answers - withdraw triggers kyc - second withdraw fails due to age restriction requirements
Diffstat (limited to 'src/exchangedb/pg_do_withdraw.h')
-rw-r--r--src/exchangedb/pg_do_withdraw.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/exchangedb/pg_do_withdraw.h b/src/exchangedb/pg_do_withdraw.h
index 406785c42..e771b1ac7 100644
--- a/src/exchangedb/pg_do_withdraw.h
+++ b/src/exchangedb/pg_do_withdraw.h
@@ -33,9 +33,12 @@
* @param nonce client-contributed input for CS denominations that must be checked for idempotency, or NULL for non-CS withdrawals
* @param[in,out] collectable corresponding collectable coin (blind signature) if a coin is found; possibly updated if a (different) signature exists already
* @param now current time (rounded)
+ * @param do_age_check set to true if age requirements must be verified
* @param[out] found set to true if the reserve was found
* @param[out] balance_ok set to true if the balance was sufficient
* @param[out] nonce_ok set to false if the nonce was reused
+ * @param[out] age_ok set to true if age requirements are met
+ * @param[out] allowed_maximum_age if @e age_ok is false, the maximum age (in years) that is allowed during age-withdraw
* @param[out] ruuid set to the reserve's UUID (reserves table row)
* @return query execution status
*/
@@ -45,9 +48,12 @@ TEH_PG_do_withdraw (
const struct TALER_CsNonce *nonce,
const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable,
struct GNUNET_TIME_Timestamp now,
+ bool do_age_check,
bool *found,
bool *balance_ok,
bool *nonce_ok,
+ bool *age_ok,
+ uint16_t *allowed_maximum_age,
uint64_t *ruuid);
#endif