@imtbl/sdk 0.30.2 → 0.30.3

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/index.cjs CHANGED
@@ -3792,7 +3792,7 @@ class MultiRollupApiClients {
3792
3792
  }
3793
3793
 
3794
3794
  // eslint-disable-next-line @typescript-eslint/naming-convention
3795
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.2' };
3795
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.3' };
3796
3796
  const createConfig = ({ basePath, headers, }) => {
3797
3797
  if (!basePath.trim()) {
3798
3798
  throw Error('basePath can not be empty');
@@ -3852,7 +3852,7 @@ class APIError extends Error {
3852
3852
 
3853
3853
  /* eslint-disable implicit-arrow-linebreak */
3854
3854
  const defaultHeaders = {
3855
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.2',
3855
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.3',
3856
3856
  };
3857
3857
  /**
3858
3858
  * createAPIConfiguration to create a custom Configuration
@@ -4263,7 +4263,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4263
4263
  chainID,
4264
4264
  coreContractAddress,
4265
4265
  registrationContractAddress,
4266
- sdkVersion: 'ts-immutable-sdk-0.30.2',
4266
+ sdkVersion: 'ts-immutable-sdk-0.30.3',
4267
4267
  });
4268
4268
  /**
4269
4269
  * Sets `sdkVersion` at the time of build
@@ -9033,10 +9033,7 @@ class AuthManager {
9033
9033
  try {
9034
9034
  const tokenResponse = await this.getDeviceFlowToken(deviceCode);
9035
9035
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
9036
- // Only persist credentials that contain the necessary data
9037
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
9038
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
9039
- }
9036
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
9040
9037
  return user;
9041
9038
  }
9042
9039
  catch (error) {
@@ -9108,10 +9105,7 @@ class AuthManager {
9108
9105
  }
9109
9106
  const tokenResponse = await this.getPKCEToken(authorizationCode, pkceData.verifier);
9110
9107
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
9111
- // Only persist credentials that contain the necessary data
9112
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
9113
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
9114
- }
9108
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
9115
9109
  return user;
9116
9110
  }, PassportErrorType.AUTHENTICATION_ERROR);
9117
9111
  }
@@ -34030,7 +34024,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
34030
34024
  return itemRequirements;
34031
34025
  }
34032
34026
 
34033
- const SDK_VERSION_MARKER = '0.30.2';
34027
+ const SDK_VERSION_MARKER = '0.30.3';
34034
34028
  // This SDK version is replaced by the `yarn build` command ran on the root level
34035
34029
  const globalPackageVersion = () => SDK_VERSION_MARKER;
34036
34030
 
package/dist/index.js CHANGED
@@ -3770,7 +3770,7 @@ class MultiRollupApiClients {
3770
3770
  }
3771
3771
 
3772
3772
  // eslint-disable-next-line @typescript-eslint/naming-convention
3773
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.2' };
3773
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.30.3' };
3774
3774
  const createConfig = ({ basePath, headers, }) => {
3775
3775
  if (!basePath.trim()) {
3776
3776
  throw Error('basePath can not be empty');
@@ -3830,7 +3830,7 @@ class APIError extends Error {
3830
3830
 
3831
3831
  /* eslint-disable implicit-arrow-linebreak */
3832
3832
  const defaultHeaders = {
3833
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.2',
3833
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.30.3',
3834
3834
  };
3835
3835
  /**
3836
3836
  * createAPIConfiguration to create a custom Configuration
@@ -4241,7 +4241,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4241
4241
  chainID,
4242
4242
  coreContractAddress,
4243
4243
  registrationContractAddress,
4244
- sdkVersion: 'ts-immutable-sdk-0.30.2',
4244
+ sdkVersion: 'ts-immutable-sdk-0.30.3',
4245
4245
  });
4246
4246
  /**
4247
4247
  * Sets `sdkVersion` at the time of build
@@ -9011,10 +9011,7 @@ class AuthManager {
9011
9011
  try {
9012
9012
  const tokenResponse = await this.getDeviceFlowToken(deviceCode);
9013
9013
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
9014
- // Only persist credentials that contain the necessary data
9015
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
9016
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
9017
- }
9014
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
9018
9015
  return user;
9019
9016
  }
9020
9017
  catch (error) {
@@ -9086,10 +9083,7 @@ class AuthManager {
9086
9083
  }
9087
9084
  const tokenResponse = await this.getPKCEToken(authorizationCode, pkceData.verifier);
9088
9085
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
9089
- // Only persist credentials that contain the necessary data
9090
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
9091
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
9092
- }
9086
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
9093
9087
  return user;
9094
9088
  }, PassportErrorType.AUTHENTICATION_ERROR);
9095
9089
  }
@@ -34008,7 +34002,7 @@ async function getItemRequirementsFromRequirements(provider, requirements) {
34008
34002
  return itemRequirements;
34009
34003
  }
34010
34004
 
34011
- const SDK_VERSION_MARKER = '0.30.2';
34005
+ const SDK_VERSION_MARKER = '0.30.3';
34012
34006
  // This SDK version is replaced by the `yarn build` command ran on the root level
34013
34007
  const globalPackageVersion = () => SDK_VERSION_MARKER;
34014
34008
 
package/dist/passport.js CHANGED
@@ -2191,7 +2191,7 @@ class MultiRollupApiClients {
2191
2191
  }
2192
2192
 
2193
2193
  // eslint-disable-next-line @typescript-eslint/naming-convention
2194
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.30.2' };
2194
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.30.3' };
2195
2195
  const createConfig = ({ basePath, headers, }) => {
2196
2196
  if (!basePath.trim()) {
2197
2197
  throw Error('basePath can not be empty');
@@ -2247,7 +2247,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2247
2247
  chainID,
2248
2248
  coreContractAddress,
2249
2249
  registrationContractAddress,
2250
- sdkVersion: 'ts-immutable-sdk-0.30.2',
2250
+ sdkVersion: 'ts-immutable-sdk-0.30.3',
2251
2251
  });
2252
2252
  /**
2253
2253
  * Sets `sdkVersion` at the time of build
@@ -7000,10 +7000,7 @@ class AuthManager {
7000
7000
  try {
7001
7001
  const tokenResponse = await this.getDeviceFlowToken(deviceCode);
7002
7002
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
7003
- // Only persist credentials that contain the necessary data
7004
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
7005
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
7006
- }
7003
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
7007
7004
  return user;
7008
7005
  }
7009
7006
  catch (error) {
@@ -7075,10 +7072,7 @@ class AuthManager {
7075
7072
  }
7076
7073
  const tokenResponse = await this.getPKCEToken(authorizationCode, pkceData.verifier);
7077
7074
  const user = AuthManager.mapDeviceTokenResponseToDomainUserModel(tokenResponse);
7078
- // Only persist credentials that contain the necessary data
7079
- if (user.imx?.ethAddress && user.imx?.starkAddress && user.imx?.userAdminAddress) {
7080
- this.deviceCredentialsManager.saveCredentials(tokenResponse);
7081
- }
7075
+ this.deviceCredentialsManager.saveCredentials(tokenResponse);
7082
7076
  return user;
7083
7077
  }, PassportErrorType.AUTHENTICATION_ERROR);
7084
7078
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.30.2",
4
+ "version": "0.30.3",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",