@imtbl/sdk 0.40.0 → 0.41.0-alpha

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.
package/dist/checkout.js CHANGED
@@ -25851,7 +25851,7 @@ class APIError extends Error {
25851
25851
 
25852
25852
  /* eslint-disable implicit-arrow-linebreak */
25853
25853
  const defaultHeaders = {
25854
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.40.0',
25854
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.41.0-alpha',
25855
25855
  };
25856
25856
  /**
25857
25857
  * createAPIConfiguration to create a custom Configuration
@@ -27201,7 +27201,7 @@ const GAS_OVERRIDES = {
27201
27201
  maxPriorityFeePerGas: BigNumber$1.from(101e9),
27202
27202
  };
27203
27203
 
27204
- const SDK_VERSION_MARKER = '0.40.0';
27204
+ const SDK_VERSION_MARKER = '0.41.0-alpha';
27205
27205
  // This SDK version is replaced by the `yarn build` command ran on the root level
27206
27206
  const globalPackageVersion = () => SDK_VERSION_MARKER;
27207
27207
 
@@ -28759,15 +28759,15 @@ const availabilityService = (isDevelopment, isProduction) => {
28759
28759
  response = await globalAxios.post(`${postEndpoint()}/v1/availability/checkout/swap`);
28760
28760
  }
28761
28761
  catch (error) {
28762
+ // The request was made and the server responded with a status code
28763
+ // that falls out of the range of 2xx
28762
28764
  response = error.response;
28765
+ // If 403 then the service is geo-blocked
28766
+ if (response.status === 403)
28767
+ return false;
28768
+ throw new CheckoutError(`Error fetching from api: ${response.status} ${response.statusText}`, CheckoutErrorType.API_ERROR);
28763
28769
  }
28764
- if (response.status === 403) {
28765
- return false;
28766
- }
28767
- if (response.status === 204) {
28768
- return true;
28769
- }
28770
- throw new CheckoutError(`Error fetching from api: ${response.status} ${response.statusText}`, CheckoutErrorType.API_ERROR);
28770
+ return true;
28771
28771
  };
28772
28772
  return {
28773
28773
  checkDexAvailability,
@@ -17,7 +17,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
17
17
  chainID,
18
18
  coreContractAddress,
19
19
  registrationContractAddress,
20
- sdkVersion: 'ts-immutable-sdk-0.40.0',
20
+ sdkVersion: 'ts-immutable-sdk-0.41.0-alpha',
21
21
  });
22
22
  /**
23
23
  * Sets `sdkVersion` at the time of build