commit 1d0b1e763713e1802a61278ca0e22b91f785eeb1
parent 422caa430283518d7de32f326b266af1120f0200
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 23 Dec 2024 21:56:11 +0100
implement exchange-side of #9068
Diffstat:
4 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
@@ -225,6 +225,20 @@ static unsigned int connection_timeout = 30;
static int connection_close;
/**
+ * Allows banks to select a custom UI/UX for certain bank-specific
+ * wallet functions, such as specific texts for buttons based on
+ * legal requirements.
+ */
+char *TEH_bank_compliance_language;
+
+/**
+ * Determines the set of AML forms (and other bank-specific settings)
+ * to be selected for the AML SPA.
+ * legal requirements.
+ */
+char *TEH_aml_spa_dialect;
+
+/**
* Option set to #GNUNET_YES if KYC/AML are enabled.
*/
int TEH_enable_kyc;
@@ -2262,6 +2276,16 @@ exchange_serve_process_config (const char *cfg_fn)
{
toplevel_redirect_url = GNUNET_strdup ("/terms");
}
+ (void)
+ GNUNET_CONFIGURATION_get_value_string (TEH_cfg,
+ "exchange",
+ "BANK_COMPLIANCE_LANGUAGE",
+ &TEH_bank_compliance_language);
+ (void)
+ GNUNET_CONFIGURATION_get_value_string (TEH_cfg,
+ "exchange",
+ "AML_SPA_DIALECT",
+ &TEH_aml_spa_dialect);
if (GNUNET_OK !=
TALER_config_get_currency (TEH_cfg,
"exchange",
diff --git a/src/exchange/taler-exchange-httpd.h b/src/exchange/taler-exchange-httpd.h
@@ -103,6 +103,20 @@ extern struct TALER_AttributeEncryptionKeyP TEH_attribute_key;
extern struct TALER_EXCHANGEDB_Plugin *TEH_plugin;
/**
+ * Allows banks to select a custom UI/UX for certain bank-specific
+ * wallet functions, such as specific texts for buttons based on
+ * legal requirements.
+ */
+extern char *TEH_bank_compliance_language;
+
+/**
+ * Determines the set of AML forms (and other bank-specific settings)
+ * to be selected for the AML SPA.
+ * legal requirements.
+ */
+extern char *TEH_aml_spa_dialect;
+
+/**
* JSON array with hard limits for /keys response.
*/
extern json_t *TEH_hard_limits;
diff --git a/src/exchange/taler-exchange-httpd_config.c b/src/exchange/taler-exchange-httpd_config.c
@@ -79,6 +79,10 @@ TEH_handler_config (struct TEH_RequestContext *rc,
GNUNET_JSON_pack_string (
"name",
"taler-exchange"),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string (
+ "aml_spa_dialect",
+ TEH_aml_spa_dialect)),
GNUNET_JSON_pack_string (
"implementation",
"urn:net:taler:specs:taler-exchange:c-reference"),
diff --git a/src/exchange/taler-exchange-httpd_keys.c b/src/exchange/taler-exchange-httpd_keys.c
@@ -2412,6 +2412,10 @@ create_krd (struct TEH_KeyStateHandle *ksh,
TEH_base_url),
GNUNET_JSON_pack_string ("currency",
TEH_currency),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string (
+ "bank_compliance_language",
+ TEH_bank_compliance_language)),
GNUNET_JSON_pack_object_steal (
"currency_specification",
TALER_CONFIG_currency_specs_to_json (TEH_cspec)),