commit a17a969173a7a12f0ce77a6dfcbfe0590a217384
parent 66c0082592c42369220b57af96da214bb53f754e
Author: Sebastian <sebasjm@gmail.com>
Date: Tue, 6 May 2025 12:26:52 -0300
access token may be not present even if the state is kyc-required
Diffstat:
4 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/packages/aml-backoffice-ui/src/pages/MeasuresTable.tsx b/packages/aml-backoffice-ui/src/pages/MeasuresTable.tsx
@@ -20,7 +20,7 @@ import {
import { useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, h, VNode } from "preact";
-export type MeasureInfo = ProcedureMeasure | FormMeasure;
+export type MeasureInfo = ProcedureMeasure | FormMeasure | InfoMeasure;
export type ProcedureMeasure = {
type: "procedure";
@@ -40,6 +40,12 @@ export type FormMeasure = {
context?: object;
custom: boolean;
};
+export type InfoMeasure = {
+ type: "info";
+ name: string;
+ context?: object;
+ custom: boolean;
+};
export type Mesaures = {
procedures: ProcedureMeasure[];
forms: FormMeasure[];
@@ -128,7 +134,7 @@ export function CurrentMeasureTable({
{m.check?.description ?? ""}
</td>
<td class="whitespace-nowrap p-2 text-sm text-gray-500">
- {m.program.description}
+ {m.program?.description}
</td>
<td class="whitespace-nowrap p-2 text-sm text-gray-500">
{Object.keys(m.context ?? {}).join(", ")}
diff --git a/packages/aml-backoffice-ui/src/pages/decision/Measures.tsx b/packages/aml-backoffice-ui/src/pages/decision/Measures.tsx
@@ -152,7 +152,7 @@ function ShowAllMeasures({
value,
})),
name: m.name,
- program: m.programName,
+ program: m.type !== "info" ? m.programName : undefined,
});
}}
/>
@@ -178,7 +178,7 @@ function ShowAllMeasures({
value,
})),
name: m.name,
- program: m.programName,
+ program: m.type !== "info" ? m.programName : undefined,
});
}}
/>
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx
@@ -141,8 +141,8 @@ function ShowInstructionForKycRedirect({
>
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
- The backend service is still synchronizing with the payment service
- provider.
+ The backend service is still synchronizing with the payment
+ service provider.
</i18n.Translate>
</p>
</ConfirmModal>
@@ -158,8 +158,9 @@ function ShowInstructionForKycRedirect({
>
<p style={{ paddingTop: 0 }}>
<i18n.Translate>
- The core banking system cannot perform wire transfers between the payment service provider's accounts and your bank accounts. Thus you cannot use this payment service provider.
- the exchange.
+ The core banking system cannot perform wire transfers between the
+ payment service provider's accounts and your bank accounts. Thus
+ you cannot use this payment service provider. the exchange.
</i18n.Translate>
</p>
</ConfirmModal>
@@ -178,13 +179,22 @@ function ShowInstructionForKycRedirect({
<i18n.Translate>
The payment provider requires more information.
</i18n.Translate>{" "}
- <a
- href={`${e.exchange_url}kyc-spa/${e.access_token}`}
- target="_blank"
- rel="noreferrer"
- >
- <i18n.Translate>Click here to complete this step.</i18n.Translate>
- </a>
+ {e.access_token === undefined ? undefined : (
+ <a
+ href={`${e.exchange_url}kyc-spa/${e.access_token}`}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <i18n.Translate>
+ Click here to complete this step.
+ </i18n.Translate>
+ </a>
+ )}
+ </p>
+ <p style={{ paddingTop: 0 }}>
+ <i18n.Translate>
+ We are waiting for the access token to be present. Check again later.
+ </i18n.Translate>
</p>
</ConfirmModal>
);
diff --git a/packages/taler-util/src/types-taler-merchant.ts b/packages/taler-util/src/types-taler-merchant.ts
@@ -1752,6 +1752,9 @@ export enum MerchantAccountKycStatus {
EXCHANGE_STATUS_INVALID = "exchange-status-invalid",
}
+/**
+ * Higher is more important
+ */
export enum MerchantAccountKycStatusSimplified {
OK = 0,
ACTION_REQUIRED = 100,