@adyen/kyc-components 2.37.1 → 2.37.2

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.
@@ -302,6 +302,7 @@ const pciDssQuestionnaire = "PCI DSS questionnaire";
302
302
  const serviceAgreementSignedSuccessfully = "Service agreement signed successfully";
303
303
  const serviceAgreementSignFailed = "Service agreement signing failed";
304
304
  const failedToGetServiceAgreementStatus = "Failed to get the service agreement status";
305
+ const failedToFetchAcceptedByName = "Failed to get the legal entity that accepted service agreement";
305
306
  const failedToGetServiceAgreement = "Failed to get the service agreement";
306
307
  const failedToGetServiceAgreementInSelectedLanguageFallbackToEn = "Failed to get the service agreement in the selected language. Falling back to English.";
307
308
  const iHaveReadAndIAcceptTheseTerms = "I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/policies-and-disclaimer/privacy-policy) and I consent to my (personal) data being used for the purposes described therein.";
@@ -1549,6 +1550,7 @@ const defaultTrans = {
1549
1550
  serviceAgreementSignedSuccessfully,
1550
1551
  serviceAgreementSignFailed,
1551
1552
  failedToGetServiceAgreementStatus,
1553
+ failedToFetchAcceptedByName,
1552
1554
  failedToGetServiceAgreement,
1553
1555
  failedToGetServiceAgreementInSelectedLanguageFallbackToEn,
1554
1556
  iHaveReadAndIAcceptTheseTerms,
@@ -32542,11 +32544,19 @@ function DropinComposerComponent({
32542
32544
  getPciTemplate().catch(logger$8.error);
32543
32545
  }, [getPciTemplate, tasks]);
32544
32546
  const addFetchedAcceptedByName = async (acceptanceInfo) => {
32545
- const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32546
- return {
32547
- ...acceptanceInfo,
32548
- acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32549
- };
32547
+ try {
32548
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32549
+ return {
32550
+ ...acceptanceInfo,
32551
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32552
+ };
32553
+ } catch (e) {
32554
+ logger$8.warn(i18n.get("failedToFetchAcceptedByName"));
32555
+ return {
32556
+ ...acceptanceInfo,
32557
+ acceptedByName: null
32558
+ };
32559
+ }
32550
32560
  };
32551
32561
  const getServiceAgreementAcceptanceInfos = async () => {
32552
32562
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
@@ -34554,7 +34564,7 @@ const ConfigurationApiProvider = ({
34554
34564
  isEmbeddedDropin,
34555
34565
  loadingContext
34556
34566
  } = authContext;
34557
- const sdkVersion = "2.37.1";
34567
+ const sdkVersion = "2.37.2";
34558
34568
  useAnalytics({
34559
34569
  onUserEvent,
34560
34570
  legalEntityId: rootLegalEntityId,
@@ -11,7 +11,7 @@ export interface ServiceAgreementAcceptanceInfo {
11
11
  type: ServiceAgreementType;
12
12
  }
13
13
  export interface ServiceAgreementAcceptanceInfoWithName extends ServiceAgreementAcceptanceInfo {
14
- acceptedByName: string;
14
+ acceptedByName?: string;
15
15
  }
16
16
  export interface ServiceAgreementSchema {
17
17
  signer?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.37.1",
3
+ "version": "2.37.2",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [