merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit ce5fe921a270c0b53f2b69881c3d13469da65daf
parent ee77fb016ef9e2657cebc52ab7e8bdd412dac734
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 11 Apr 2025 21:14:48 +0200

increase kyc-check frequency to 6h if we are zero-limited on ops we care about (see #9719)

Diffstat:
Msrc/backend/taler-merchant-kyccheck.c | 18+++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c @@ -229,6 +229,13 @@ struct Inquiry bool not_first_time; /** + * Do soft limits on transactions apply to this merchant for operations + * merchants care about? If so, we should increase our request frequency + * and ask more often to see if they were lifted. + */ + bool zero_limited; + + /** * Did we not run this inquiry due to limits? */ bool limited; @@ -447,6 +454,7 @@ store_kyc_status ( json_decref (i->jlimits); jlimits = json_array (); GNUNET_assert (NULL != jlimits); + i->zero_limited = false; for (unsigned int j = 0; j<account_kyc_status->limits_length; j++) { const struct TALER_EXCHANGE_AccountLimit *limit @@ -454,6 +462,14 @@ store_kyc_status ( pack_limit (limit, jlimits); + if (TALER_amount_is_zero (&limit->threshold) && + limit->soft_limit && + ( (TALER_KYCLOGIC_KYC_TRIGGER_DEPOSIT == limit->operation_type) || + (TALER_KYCLOGIC_KYC_TRIGGER_AGGREGATE == limit->operation_type) || + (TALER_KYCLOGIC_KYC_TRIGGER_TRANSACTION == limit->operation_type) ) ) + { + i->zero_limited = true; + } } i->jlimits = jlimits; GNUNET_break (! GNUNET_is_zero (&account_kyc_status->access_token)); @@ -498,7 +514,7 @@ exchange_check_cb ( store_kyc_status (i, &ks->details.ok); i->backoff = GNUNET_TIME_UNIT_ZERO; - if (i->aml_review) + if (i->aml_review || i->zero_limited) { if (! progress) i->due = GNUNET_TIME_relative_to_absolute (AML_FREQ);