gbc-kyc-kit 1.5.0 → 1.5.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.
@@ -18784,7 +18784,7 @@ var lib$1 = isEmpty$2;
18784
18784
  function useGeolocation() {
18785
18785
  const [geolocation, setGeolocation] = useState(null);
18786
18786
  useEffect(() => {
18787
- fetch("http://ip-api.com/json/").then((res) => res.json()).then((res) => setGeolocation(res)).catch((error) => console.log(error));
18787
+ fetch("https://ipapi.co/json").then((res) => res.json()).then((res) => setGeolocation(res)).catch((error) => console.log(error));
18788
18788
  }, []);
18789
18789
  return geolocation;
18790
18790
  }
@@ -18798,9 +18798,9 @@ const BlackListController = (clientId, authorize, inProduction, countryCodeAllow
18798
18798
  const [countryCode, setCountryCode] = useState(null);
18799
18799
  const geolocation = useGeolocation();
18800
18800
  useEffect(() => {
18801
- countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.countryCode);
18801
+ countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.country_code);
18802
18802
  if (countryCodeAllowed && geolocation) {
18803
- if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.countryCode)) {
18803
+ if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.country_code)) {
18804
18804
  setStatus("COUNTRY_NOT_ALLOWED");
18805
18805
  setMessage("Pa\xEDs no autorizado");
18806
18806
  }
@@ -20320,9 +20320,9 @@ const DocumentReaderController = (dataDocument, clientId, authorize, inProductio
20320
20320
  const [countryCode, setCountryCode] = useState(null);
20321
20321
  const geolocation = useGeolocation();
20322
20322
  useEffect(() => {
20323
- countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.countryCode);
20323
+ countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.country_code);
20324
20324
  if (countryCodeAllowed && geolocation) {
20325
- if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.countryCode)) {
20325
+ if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.country_code)) {
20326
20326
  setStatus("COUNTRY_NOT_ALLOWED");
20327
20327
  setMessage("Pa\xEDs no autorizado");
20328
20328
  }
@@ -20603,9 +20603,9 @@ const FaceMatchController = (dataFaceMatch, clientId, authorize, inProduction, p
20603
20603
  setUrl(imageSrc);
20604
20604
  }, [webcamRef]);
20605
20605
  useEffect(() => {
20606
- countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.countryCode);
20606
+ countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.country_code);
20607
20607
  if (countryCodeAllowed && geolocation) {
20608
- if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.countryCode)) {
20608
+ if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.country_code)) {
20609
20609
  setStatus("COUNTRY_NOT_ALLOWED");
20610
20610
  setMessage("Pa\xEDs no autorizado");
20611
20611
  }
@@ -24673,9 +24673,9 @@ const LivenessCheckController = (clientId, authorize, inProduction, countryCodeA
24673
24673
  }
24674
24674
  };
24675
24675
  useEffect(() => {
24676
- countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.countryCode);
24676
+ countryCodeAllowed && geolocation && setCountryCode(geolocation == null ? void 0 : geolocation.country_code);
24677
24677
  if (countryCodeAllowed && geolocation) {
24678
- if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.countryCode)) {
24678
+ if (!countryCodeAllowed.includes(geolocation == null ? void 0 : geolocation.country_code)) {
24679
24679
  setStatus("COUNTRY_NOT_ALLOWED");
24680
24680
  setMessage("Pa\xEDs no autorizado");
24681
24681
  }