diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd_withdraw.c')
| -rw-r--r-- | src/exchange/taler-exchange-httpd_withdraw.c | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_withdraw.c b/src/exchange/taler-exchange-httpd_withdraw.c index d9cba045..ca5618af 100644 --- a/src/exchange/taler-exchange-httpd_withdraw.c +++ b/src/exchange/taler-exchange-httpd_withdraw.c @@ -1,6 +1,6 @@  /*    This file is part of TALER -  Copyright (C) 2014-2019 Taler Systems SA +  Copyright (C) 2014-2021 Taler Systems SA    TALER is free software; you can redistribute it and/or modify    it under the terms of the GNU Affero General Public License as @@ -165,6 +165,7 @@ withdraw_transaction (void *cls,    struct TALER_EXCHANGEDB_Reserve r;    enum GNUNET_DB_QueryStatus qs;    struct TALER_DenominationSignature denom_sig; +  struct TALER_EXCHANGEDB_KycStatus kyc;  #if OPTIMISTIC_SIGN    /* store away optimistic signature to protect @@ -209,7 +210,8 @@ withdraw_transaction (void *cls,                "Trying to withdraw from reserve: %s\n",                TALER_B2S (&r.pub));    qs = TEH_plugin->reserves_get (TEH_plugin->cls, -                                 &r); +                                 &r, +                                 &kyc);    if (0 > qs)    {      if (GNUNET_DB_STATUS_HARD_ERROR == qs) @@ -268,6 +270,13 @@ withdraw_transaction (void *cls,      return GNUNET_DB_STATUS_HARD_ERROR;    } +  if ( (! kyc.ok) && +       (TEH_KYC_NONE != TEH_kyc_config.mode) ) +  { +    // FIXME: check if we are above the limit +    // for KYC, and if so, deny the transaction! +  } +    /* Balance is good, sign the coin! */  #if ! OPTIMISTIC_SIGN    if (NULL == wc->collectable.sig.rsa_signature)  | 
