ng-easycommerce 0.0.593 → 0.0.594

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.
@@ -3360,7 +3360,7 @@ var IpService = /** @class */ (function () {
3360
3360
  function IpService(http) {
3361
3361
  this.http = http;
3362
3362
  this.apiGetIp = 'https://api64.ipify.org?format=json'; // También puedes usar 'https://api.myip.com'
3363
- this.apiGetLocation = 'http://ip-api.com/json/';
3363
+ this.apiGetLocation = 'https://ipinfo.io/json';
3364
3364
  }
3365
3365
  IpService.prototype.getIp = function () {
3366
3366
  return this.http.get(this.apiGetIp);
@@ -3495,18 +3495,16 @@ var CheckoutService = /** @class */ (function () {
3495
3495
  _this.stateSubject.next(final_steps);
3496
3496
  // Obtener IP y ubicación
3497
3497
  forkJoin({
3498
- ip: _this.ipService.getIp(),
3499
- location: _this.ipService.getLocation()
3498
+ ip: _this.ipService.getIp().pipe(catchError(function () { return of(null); })),
3499
+ location: _this.ipService.getLocation().pipe(catchError(function () { return of(null); }))
3500
3500
  }).subscribe(function (results) {
3501
3501
  var _a, _b, _c;
3502
3502
  var params = {
3503
- ip: (_a = results.ip) === null || _a === void 0 ? void 0 : _a.ip,
3504
- country: (_b = results.location) === null || _b === void 0 ? void 0 : _b.country,
3505
- city: (_c = results.location) === null || _c === void 0 ? void 0 : _c.city
3503
+ ip: ((_a = results.ip) === null || _a === void 0 ? void 0 : _a.ip) || 'unknown',
3504
+ country: ((_b = results.location) === null || _b === void 0 ? void 0 : _b.country) || 'unknown',
3505
+ city: ((_c = results.location) === null || _c === void 0 ? void 0 : _c.city) || 'unknown'
3506
3506
  };
3507
- // Convertir los datos a una cadena de consulta
3508
3507
  var queryString = new URLSearchParams(params).toString();
3509
- // Agregar la cadena de consulta a la URL del endpoint
3510
3508
  var urlWithParams = _this.getHasPurchaseConditions() + "?" + queryString;
3511
3509
  _this.connection.getErrorNotHandler(urlWithParams).toPromise().then(function (res) {
3512
3510
  var _a, _b;