@adyen/kyc-components 2.38.0 → 2.38.1

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.
@@ -304,6 +304,7 @@ const pciDssQuestionnaire = "PCI DSS questionnaire";
304
304
  const serviceAgreementSignedSuccessfully = "Service agreement signed successfully";
305
305
  const serviceAgreementSignFailed = "Service agreement signing failed";
306
306
  const failedToGetServiceAgreementStatus = "Failed to get the service agreement status";
307
+ const failedToFetchAcceptedByName = "Failed to get the legal entity that accepted service agreement";
307
308
  const failedToGetServiceAgreement = "Failed to get the service agreement";
308
309
  const failedToGetServiceAgreementInSelectedLanguageFallbackToEn = "Failed to get the service agreement in the selected language. Falling back to English.";
309
310
  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.";
@@ -1561,6 +1562,7 @@ const defaultTrans = {
1561
1562
  serviceAgreementSignedSuccessfully,
1562
1563
  serviceAgreementSignFailed,
1563
1564
  failedToGetServiceAgreementStatus,
1565
+ failedToFetchAcceptedByName,
1564
1566
  failedToGetServiceAgreement,
1565
1567
  failedToGetServiceAgreementInSelectedLanguageFallbackToEn,
1566
1568
  iHaveReadAndIAcceptTheseTerms,
@@ -32805,11 +32807,19 @@ function DropinComposerComponent({
32805
32807
  getPciTemplate().catch(logger$8.error);
32806
32808
  }, [getPciTemplate, tasks]);
32807
32809
  const addFetchedAcceptedByName = async (acceptanceInfo) => {
32808
- const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32809
- return {
32810
- ...acceptanceInfo,
32811
- acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32812
- };
32810
+ try {
32811
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32812
+ return {
32813
+ ...acceptanceInfo,
32814
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32815
+ };
32816
+ } catch (e) {
32817
+ logger$8.warn(i18n.get("failedToFetchAcceptedByName"));
32818
+ return {
32819
+ ...acceptanceInfo,
32820
+ acceptedByName: null
32821
+ };
32822
+ }
32813
32823
  };
32814
32824
  const getServiceAgreementAcceptanceInfos = async () => {
32815
32825
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
@@ -34860,7 +34870,7 @@ const ConfigurationApiProvider = ({
34860
34870
  isEmbeddedDropin,
34861
34871
  loadingContext
34862
34872
  } = authContext;
34863
- const sdkVersion = "2.38.0";
34873
+ const sdkVersion = "2.38.1";
34864
34874
  useAnalytics({
34865
34875
  onUserEvent,
34866
34876
  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.38.0",
3
+ "version": "2.38.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [