@dynamic-labs/utils 4.0.0-alpha.2 → 4.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -1,4 +1,17 @@
1
1
 
2
+ ## [4.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-09-20)
3
+
4
+
5
+ ### Features
6
+
7
+ * developers provide global connectivity appkit project id ([#6941](https://github.com/dynamic-labs/DynamicAuth/issues/6941)) ([83760ea](https://github.com/dynamic-labs/DynamicAuth/commit/83760ea57591685b12caee945f173f6a7f9312d1))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * don't try to set up event listeners if wallet provider doesn't support it ([#6943](https://github.com/dynamic-labs/DynamicAuth/issues/6943)) ([439f1bb](https://github.com/dynamic-labs/DynamicAuth/commit/439f1bbb3c765959756cfc6eeb8429e4018e0379))
13
+ * dont verify all signatures for solana embedded multisig tx ([#6953](https://github.com/dynamic-labs/DynamicAuth/issues/6953)) ([7a7973e](https://github.com/dynamic-labs/DynamicAuth/commit/7a7973e05f0960421b348a55c6a00c9fd873b0b7))
14
+
2
15
  ## [4.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2024-09-18)
3
16
 
4
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "4.0.0-alpha.2",
3
+ "version": "4.0.0-alpha.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -26,10 +26,10 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@dynamic-labs/sdk-api-core": "0.0.530",
29
+ "@dynamic-labs/sdk-api-core": "0.0.534",
30
30
  "tldts": "6.0.16",
31
- "@dynamic-labs/logger": "4.0.0-alpha.2",
32
- "@dynamic-labs/types": "4.0.0-alpha.2",
31
+ "@dynamic-labs/logger": "4.0.0-alpha.3",
32
+ "@dynamic-labs/types": "4.0.0-alpha.3",
33
33
  "buffer": "6.0.3",
34
34
  "eventemitter3": "5.0.1",
35
35
  "stream": "0.0.2"
@@ -28,11 +28,10 @@ class Oauth2Service {
28
28
  _a = Oauth2Service;
29
29
  _Oauth2Service_implementation = { value: void 0 };
30
30
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- Oauth2Service.isGetOauthCodeError = (error) => error === 'user-cancelled' ||
32
- (typeof error === 'object' &&
33
- 'code' in error &&
34
- Object.values(types.SocialOAuthErrorCode).includes(error.code) &&
35
- 'message' in error &&
36
- typeof error.message === 'string');
31
+ Oauth2Service.isGetOauthCodeError = (error) => typeof error === 'object' &&
32
+ 'code' in error &&
33
+ Object.values(types.SocialOAuthErrorCode).includes(error.code) &&
34
+ 'message' in error &&
35
+ typeof error.message === 'string';
37
36
 
38
37
  exports.Oauth2Service = Oauth2Service;
@@ -25,7 +25,7 @@ export type GetOauthCodeProps = {
25
25
  export type IOauth2Service = {
26
26
  getOauthCode: (props: GetOauthCodeProps) => Promise<string>;
27
27
  };
28
- export type GetOauthCodeError = 'user-cancelled' | {
28
+ export type GetOauthCodeError = {
29
29
  code: SocialOAuthErrorCode;
30
30
  message: string;
31
31
  };
@@ -24,11 +24,10 @@ class Oauth2Service {
24
24
  _a = Oauth2Service;
25
25
  _Oauth2Service_implementation = { value: void 0 };
26
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
- Oauth2Service.isGetOauthCodeError = (error) => error === 'user-cancelled' ||
28
- (typeof error === 'object' &&
29
- 'code' in error &&
30
- Object.values(SocialOAuthErrorCode).includes(error.code) &&
31
- 'message' in error &&
32
- typeof error.message === 'string');
27
+ Oauth2Service.isGetOauthCodeError = (error) => typeof error === 'object' &&
28
+ 'code' in error &&
29
+ Object.values(SocialOAuthErrorCode).includes(error.code) &&
30
+ 'message' in error &&
31
+ typeof error.message === 'string';
33
32
 
34
33
  export { Oauth2Service };
@@ -167,7 +167,10 @@ const createWindowOauth2Service = () => ({
167
167
  setIsProcessing(false);
168
168
  // user didn't complete oauth
169
169
  if (providersWaitingOauthMessage[provider])
170
- typedReject('user-cancelled');
170
+ typedReject({
171
+ code: types.SocialOAuthErrorCode.USER_CANCELLED,
172
+ message: 'User cancelled connection',
173
+ });
171
174
  }, 2000);
172
175
  });
173
176
  }),
@@ -163,7 +163,10 @@ const createWindowOauth2Service = () => ({
163
163
  setIsProcessing(false);
164
164
  // user didn't complete oauth
165
165
  if (providersWaitingOauthMessage[provider])
166
- typedReject('user-cancelled');
166
+ typedReject({
167
+ code: SocialOAuthErrorCode.USER_CANCELLED,
168
+ message: 'User cancelled connection',
169
+ });
167
170
  }, 2000);
168
171
  });
169
172
  }),