commit f0e82540712049d0404f35a6d19ec3c27b4a0668
parent 1919bce72913319e5c3d6d795c2095bd108f6e86
Author: Florian Dold <dold@taler.net>
Date: Thu, 27 Aug 2026 00:48:17 +0200
AML web UI: remove GLS dialect support
Diffstat:
7 files changed, 0 insertions(+), 197 deletions(-)
diff --git a/packages/taler-exchange-aml-webui/src/pages/Dashboard.tsx b/packages/taler-exchange-aml-webui/src/pages/Dashboard.tsx
@@ -69,14 +69,6 @@ function EventMetrics(): VNode {
(pref.testingDialect ? undefined : config.config.aml_spa_dialect) ??
AmlSpaDialect.TESTING;
- if (dialect === "gls") {
- return (
- <div>
- No dashboard configured for dialect <code>gls</code>.
- </div>
- );
- }
-
const resp = useTopsServerStatistics();
if (!resp) {
@@ -160,13 +152,6 @@ function labelForEvent(
name,
i18n,
);
- case AmlSpaDialect.GLS:
- // return labelForEvent_gls(name as GLS_AmlEventsName, i18n);
- return labelForEvent_tops(
- // @ts-expect-error name is the field
- name,
- i18n,
- );
case AmlSpaDialect.TESTING:
return labelForEvent_tops(
// @ts-expect-error name is the field
@@ -212,21 +197,6 @@ function labelForEvent_tops(
}
}
}
-// function labelForEvent_gls(
-// name: GLS_AmlEventsName,
-// i18n: InternationalizationAPI,
-// ) {
-// switch (name) {
-// case GLS_AmlEventsName.ACCOUNT_OPENED:
-// return i18n.str`Account opened`;
-// case GLS_AmlEventsName.ACCOUNT_CLOSED:
-// return i18n.str`Account closed`;
-// default: {
-// assertUnreachable(name);
-// }
-// }
-// }
-
function descriptionForEvent(
name: string,
i18n: InternationalizationAPI,
@@ -239,13 +209,6 @@ function descriptionForEvent(
name,
i18n,
);
- case AmlSpaDialect.GLS:
- return descriptionForEvent_tops(
- // @ts-expect-error name is the field
- name,
- i18n,
- );
- // return descriptionForEvent_gls(name as GLS_AmlEventsName, i18n);
case AmlSpaDialect.TESTING:
return descriptionForEvent_tops(
// @ts-expect-error name is the field
@@ -293,21 +256,6 @@ function descriptionForEvent_tops(
}
}
-// function descriptionForEvent_gls(
-// name: GLS_AmlEventsName,
-// i18n: InternationalizationAPI,
-// ): TranslatedString | undefined {
-// switch (name) {
-// case GLS_AmlEventsName.ACCOUNT_OPENED:
-// return i18n.str`Account opened`;
-// case GLS_AmlEventsName.ACCOUNT_CLOSED:
-// return i18n.str`Account closed`;
-// default: {
-// assertUnreachable(name);
-// }
-// }
-// }
-
function MetricValueNumber({
current,
previous,
diff --git a/packages/taler-exchange-aml-webui/src/pages/decision/Events.tsx b/packages/taler-exchange-aml-webui/src/pages/decision/Events.tsx
@@ -221,26 +221,10 @@ const formDesign = (
// }
// }
-// function labelForEvent_gls(
-// event: GLS_AmlEventsName,
-// i18n: InternationalizationAPI,
-// ) {
-// switch (event) {
-// case GLS_AmlEventsName.ACCOUNT_OPENED:
-// return i18n.str`Account opened`;
-// case GLS_AmlEventsName.ACCOUNT_CLOSED:
-// return i18n.str`Account closed`;
-// default: {
-// assertUnreachable(event);
-// }
-// }
-// }
-
function calculateEventsBasedOnState(
currentState: AmlDecision | undefined,
request: DecisionRequest,
// i18n: InternationalizationAPI,
- // dialect: AmlSpaDialect,
): Events {
const init: Events = { triggered: [], rest: [] };
const form = (request.attributes?.data ?? {}) as Record<string, unknown>;
diff --git a/packages/taler-exchange-aml-webui/src/pages/decision/Properties.tsx b/packages/taler-exchange-aml-webui/src/pages/decision/Properties.tsx
@@ -16,8 +16,6 @@
import {
AccountProperties,
AmlSpaDialect,
- GLS_AccountProperties,
- GLS_AML_PROPERTIES,
LegitimizationRuleSet,
PropertiesDerivation_TOPS,
PropertiesDerivationFunctionByPropertyName,
@@ -317,16 +315,6 @@ function propertiesByDialect(
];
}
- if (dialect === AmlSpaDialect.GLS) {
- return [
- {
- id: "GLS_CUSTOMER_ID",
- label: i18n.str`GLS Customer ID`,
- type: "text",
- },
- ];
- }
-
return [];
}
@@ -373,13 +361,6 @@ function calculatePropertiesBasedOnState(
PropertiesDerivation_TOPS,
);
}
- case AmlSpaDialect.GLS: {
- return mergeProperties(
- initial,
- GLS_AccountProperties,
- GLS_AML_PROPERTIES,
- );
- }
case AmlSpaDialect.TESTING: {
return mergeProperties(
initial,
diff --git a/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx b/packages/taler-exchange-aml-webui/src/pages/decision/Rules.tsx
@@ -390,17 +390,6 @@ function UpdateRulesForm({
</button>
);
- const ButtonRulesGlsMerchantRegisteredEcommerce = () => (
- <button
- onClick={() => {
- setRules(GLS_MERCHANT_REGISTERED_ECOMMERCE(config.currency, isWallet));
- }}
- class="m-4 rounded-md w-fit border-0 px-3 py-2 text-center text-sm bg-indigo-700 text-white shadow-sm hover:bg-indigo-700 disabled:bg-gray-600"
- >
- <i18n.Translate>GLS Registered E-Commerce Merchant</i18n.Translate>
- </button>
- );
-
return (
<div>
{!ruleInconsistency ? undefined : (
@@ -526,11 +515,6 @@ function UpdateRulesForm({
<ButtonRulesPoS />
</>
) : null}
- {dialect == AmlSpaDialect.GLS ? (
- <>
- <ButtonRulesGlsMerchantRegisteredEcommerce />
- </>
- ) : null}
<h2 class="mt-4 mb-2">
<i18n.Translate>Behavior on rule expiration</i18n.Translate>
</h2>
@@ -1025,62 +1009,6 @@ const POINT_OF_SALE: TemplateRulesFunction = (currency, isWallet) =>
: BANK_RULES.includes(r.operation_type);
});
-const GLS_MERCHANT_REGISTERED_ECOMMERCE: TemplateRulesFunction = (
- currency,
- isWallet,
-) =>
- [
- {
- display_priority: 1,
- measures: ["VERBOTEN"],
- operation_type: LimitOperationType.withdraw,
- threshold: Amounts.stringify(`${currency}:0`),
- timeframe: Duration.toTalerProtocolDuration(
- Duration.fromSpec({ months: 1 }),
- ),
- },
- {
- display_priority: 1,
- measures: ["VERBOTEN"],
- operation_type: LimitOperationType.close,
- threshold: Amounts.stringify(`${currency}:0`),
- timeframe: Duration.toTalerProtocolDuration(
- Duration.fromSpec({ months: 1 }),
- ),
- },
- {
- display_priority: 1,
- measures: ["VERBOTEN"],
- operation_type: LimitOperationType.merge,
- threshold: Amounts.stringify(`${currency}:0`),
- timeframe: Duration.toTalerProtocolDuration(
- Duration.fromSpec({ months: 1 }),
- ),
- },
- {
- display_priority: 1,
- measures: ["preserve-investigate"],
- operation_type: LimitOperationType.deposit,
- threshold: Amounts.stringify(`${currency}:100000`),
- timeframe: Duration.toTalerProtocolDuration(
- Duration.fromSpec({ months: 1 }),
- ),
- },
- {
- display_priority: 1,
- measures: ["preserve-investigate"],
- operation_type: LimitOperationType.aggregate,
- threshold: Amounts.stringify(`${currency}:100000`),
- timeframe: Duration.toTalerProtocolDuration(
- Duration.fromSpec({ months: 1 }),
- ),
- },
- ].filter((r) => {
- return isWallet
- ? WALLET_RULES.includes(r.operation_type)
- : BANK_RULES.includes(r.operation_type);
- });
-
const E_COMMERCE: TemplateRulesFunction = (currency, isWallet) =>
[
{
diff --git a/packages/taler-util/src/aml/events.ts b/packages/taler-util/src/aml/events.ts
@@ -37,14 +37,6 @@ export enum TOPS_AmlEventsName {
DECR_INVESTIGATION_CONCLUDED = "DECR_INVESTIGATION_CONCLUDED",
}
-/**
- * List of events triggered by GLS
- */
-export enum GLS_AmlEventsName {
- ACCOUNT_OPENED = "ACCOUNT_OPENED",
- ACCOUNT_CLOSED = "ACCOUNT_CLOSED",
-}
-
enum KnownForms {
vqf_902_1_customer,
vqf_902_1_officer,
@@ -558,19 +550,6 @@ export const EventsDerivation_TOPS: EventMapInfo<typeof TOPS_AmlEventsName> = {
},
};
-export const GLS_AML_EVENTS: EventMapInfo<typeof GLS_AmlEventsName> = {
- ACCOUNT_OPENED: {
- shouldBeTriggered(formId, prevState, nextState, attr) {
- return false;
- },
- },
- ACCOUNT_CLOSED: {
- shouldBeTriggered(formId, prevState, nextState, attr) {
- return false;
- },
- },
-};
-
const topsEventNames = Object.values(TOPS_AmlEventsName);
export function deriveTopsAmlEvents(
diff --git a/packages/taler-util/src/aml/properties.ts b/packages/taler-util/src/aml/properties.ts
@@ -23,11 +23,6 @@ export const TOPS_AccountProperties = [
TalerAmlProperties.SANCTION_LIST_SUPPRESS,
] as const;
-/**
- * List of account properties required by GLS
- */
-export const GLS_AccountProperties = [TalerAmlProperties.FILE_NOTE] as const;
-
export type PropertiesDerivationFunctionByPropertyName<T extends string> = {
[name in T]: {
/**
@@ -224,16 +219,6 @@ export const PropertiesDerivation_TOPS: PropertiesDerivationFunctionByPropertyNa
},
};
-export const GLS_AML_PROPERTIES: PropertiesDerivationFunctionByPropertyName<
- (typeof GLS_AccountProperties)[number]
-> = {
- FILE_NOTE: {
- deriveProperty(formId, attributes, state) {
- return undefined;
- },
- },
-};
-
export function deriveTopsAmlProperties(
formId: string,
newAttributes: AmlFormAttributesMap,
diff --git a/packages/taler-util/src/types-taler-exchange.ts b/packages/taler-util/src/types-taler-exchange.ts
@@ -2000,7 +2000,6 @@ export type AmlDecisionRequestWithoutSignature = Omit<
export enum AmlSpaDialect {
TOPS = "tops",
- GLS = "gls",
TESTING = "testing",
}
@@ -2705,7 +2704,6 @@ interface CSDenominationKey {
}
export const codecForAmlSpaDialect = codecForEither(
- codecForConstString(AmlSpaDialect.GLS),
codecForConstString(AmlSpaDialect.TOPS),
codecForConstString(AmlSpaDialect.TESTING),
);