@adyen/kyc-components 3.41.5 → 3.41.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22596,7 +22596,7 @@ function PayoutAccount(props) {
|
|
|
22596
22596
|
const { data, valid, errors, schema } = useForm({
|
|
22597
22597
|
...props,
|
|
22598
22598
|
defaultData: props.data,
|
|
22599
|
-
schema:
|
|
22599
|
+
schema: ["accountHolder"],
|
|
22600
22600
|
rules: props.validators,
|
|
22601
22601
|
fieldProblems: props == null ? void 0 : props.fieldValidationErrors
|
|
22602
22602
|
});
|
|
@@ -32585,7 +32585,7 @@ const getRegularTaskStatus = ({
|
|
|
32585
32585
|
if (relevantEntityIds.length === 0) {
|
|
32586
32586
|
return { status: TaskStatus.EMPTY, reason: "newEntityAlwaysEmpty" };
|
|
32587
32587
|
}
|
|
32588
|
-
if (isEmptyEntity(rootLegalEntity)) {
|
|
32588
|
+
if (relevantEntityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity)) {
|
|
32589
32589
|
return { status: TaskStatus.EMPTY, reason: "rootLegalEntityIsEmpty" };
|
|
32590
32590
|
}
|
|
32591
32591
|
const importantProblems = findImportantProblems(
|
|
@@ -32641,6 +32641,7 @@ const calculateTaskStatus = ({
|
|
|
32641
32641
|
taskIdentifier,
|
|
32642
32642
|
capabilityProblems,
|
|
32643
32643
|
rootLegalEntity,
|
|
32644
|
+
accountHolder,
|
|
32644
32645
|
legalRepresentative,
|
|
32645
32646
|
trustMembers,
|
|
32646
32647
|
transferInstruments
|
|
@@ -32677,9 +32678,16 @@ const calculateTaskStatus = ({
|
|
|
32677
32678
|
if (!id) throw new Error("Decision maker task identifier should specify an ID");
|
|
32678
32679
|
relevantEntityIds = [id];
|
|
32679
32680
|
break;
|
|
32680
|
-
case TaskTypes.TRUST:
|
|
32681
|
-
|
|
32681
|
+
case TaskTypes.TRUST: {
|
|
32682
|
+
const trustIds = getOwnTrustLegalEntityIdAsArray(rootLegalEntity);
|
|
32683
|
+
if (accountHolder === "aTrust" && trustIds.length === 0)
|
|
32684
|
+
return {
|
|
32685
|
+
status: TaskStatus.EMPTY,
|
|
32686
|
+
reason: "newEntityAlwaysEmpty"
|
|
32687
|
+
};
|
|
32688
|
+
relevantEntityIds = trustIds;
|
|
32682
32689
|
break;
|
|
32690
|
+
}
|
|
32683
32691
|
case TaskTypes.TRUST_MEMBER_OVERVIEW:
|
|
32684
32692
|
if (!hasRequiredTrustMemberCount(trustMembers))
|
|
32685
32693
|
return {
|
|
@@ -32759,6 +32767,7 @@ const determineTaskIdentifiers = ({
|
|
|
32759
32767
|
tasks.push(TaskTypes.SOLE_PROPRIETOR_COMPANY);
|
|
32760
32768
|
}
|
|
32761
32769
|
if (accountHolder === "aTrust") {
|
|
32770
|
+
tasks.push(TaskTypes.TRUST);
|
|
32762
32771
|
tasks.push(TaskTypes.TRUST_MEMBER_OVERVIEW);
|
|
32763
32772
|
trustMembers.forEach((member) => {
|
|
32764
32773
|
if (member.trustMemberType === "undefinedBeneficiary") {
|
|
@@ -32811,6 +32820,7 @@ const computed = dist.createComputed(
|
|
|
32811
32820
|
acc[taskIdentifier] = calculateTaskStatus({
|
|
32812
32821
|
taskIdentifier,
|
|
32813
32822
|
// we know that neither `rootLegalEntity` nor `capabilityProblems` are undefined if there are tasks
|
|
32823
|
+
accountHolder,
|
|
32814
32824
|
capabilityProblems,
|
|
32815
32825
|
rootLegalEntity,
|
|
32816
32826
|
legalRepresentative,
|
|
@@ -32866,7 +32876,7 @@ const useGetTaskStatus = () => {
|
|
|
32866
32876
|
var _a;
|
|
32867
32877
|
const taskIdentifier = id ? `${taskType}-${id}` : taskType;
|
|
32868
32878
|
const status = (_a = taskStatuses[taskIdentifier]) == null ? void 0 : _a.status;
|
|
32869
|
-
if (
|
|
32879
|
+
if (status === void 0) {
|
|
32870
32880
|
logger$r.warn(`No status for task '${taskIdentifier}', returning UNKNOWN`);
|
|
32871
32881
|
return TaskStatus.UNKNOWN;
|
|
32872
32882
|
}
|
|
@@ -43639,7 +43649,7 @@ const ConfigurationApiProvider = ({
|
|
|
43639
43649
|
}) => {
|
|
43640
43650
|
const authContext = useAuthContext();
|
|
43641
43651
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
43642
|
-
const sdkVersion = "3.41.
|
|
43652
|
+
const sdkVersion = "3.41.7";
|
|
43643
43653
|
useAnalytics({
|
|
43644
43654
|
onUserEvent,
|
|
43645
43655
|
legalEntityId: rootLegalEntityId,
|
|
@@ -44480,7 +44490,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
|
|
|
44480
44490
|
const { i18n } = useI18nContext();
|
|
44481
44491
|
const [tab, setTab] = useState("metadata");
|
|
44482
44492
|
const metadata = {
|
|
44483
|
-
sdkVersion: "3.41.
|
|
44493
|
+
sdkVersion: "3.41.7",
|
|
44484
44494
|
locale: i18n.locale,
|
|
44485
44495
|
rootLegalEntityId
|
|
44486
44496
|
};
|
|
@@ -6,10 +6,12 @@ import type { TransferInstrumentOverview } from '../../core/models/api/transfer-
|
|
|
6
6
|
import type { TaskStatusWithReason } from './taskStatus';
|
|
7
7
|
import { TaskTypes } from './taskTypes';
|
|
8
8
|
import type { TaskIdentifier } from './taskStore';
|
|
9
|
-
|
|
9
|
+
import type { AccountHolderOption } from '../../components/internal/AccountHolder/types';
|
|
10
|
+
export declare const calculateTaskStatus: ({ taskIdentifier, capabilityProblems, rootLegalEntity, accountHolder, legalRepresentative, trustMembers, transferInstruments, }: {
|
|
10
11
|
taskIdentifier: TaskIdentifier;
|
|
11
12
|
capabilityProblems: CapabilityProblems;
|
|
12
13
|
rootLegalEntity: ExistingLegalEntity;
|
|
14
|
+
accountHolder: AccountHolderOption | undefined;
|
|
13
15
|
legalRepresentative: LegalEntityAssociation | undefined;
|
|
14
16
|
trustMembers: TrustMember[];
|
|
15
17
|
transferInstruments: TransferInstrumentOverview[];
|