@dynamic-labs/sdk-react-core 4.0.0-alpha.4 → 4.0.0-alpha.5

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.5](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.4...v4.0.0-alpha.5) (2024-09-25)
3
+
4
+
5
+ ### Features
6
+
7
+ * add isInstalledOnBrowser prop to wallet options in useWalletOptions ([#6976](https://github.com/dynamic-labs/DynamicAuth/issues/6976)) ([0fda409](https://github.com/dynamic-labs/DynamicAuth/commit/0fda409b293c83d73869d791c3d38ac421dcdecb))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **client:** return user profile when using sign in with external jwt ([#7004](https://github.com/dynamic-labs/DynamicAuth/issues/7004)) ([927cfb6](https://github.com/dynamic-labs/DynamicAuth/commit/927cfb69f3dd7f8b00e3f0f975277a84c99c830b))
13
+ * react-native-extension to include esm ([#6965](https://github.com/dynamic-labs/DynamicAuth/issues/6965)) ([336825b](https://github.com/dynamic-labs/DynamicAuth/commit/336825b50142002bbc67c6f8850bd63030bf384b))
14
+
2
15
  ## [4.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-09-23)
3
16
 
4
17
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.4";
6
+ var version = "4.0.0-alpha.5";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.535",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.4";
2
+ var version = "4.0.0-alpha.5";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.535",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.0.0-alpha.4",
3
+ "version": "4.0.0-alpha.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,16 +17,15 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "4.0.0-alpha.4",
21
- "@dynamic-labs/logger": "4.0.0-alpha.4",
22
- "@dynamic-labs/message-transport": "4.0.0-alpha.4",
23
- "@dynamic-labs/multi-wallet": "4.0.0-alpha.4",
24
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.4",
25
- "@dynamic-labs/store": "4.0.0-alpha.4",
26
- "@dynamic-labs/types": "4.0.0-alpha.4",
27
- "@dynamic-labs/utils": "4.0.0-alpha.4",
28
- "@dynamic-labs/wallet-book": "4.0.0-alpha.4",
29
- "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.4",
20
+ "@dynamic-labs/iconic": "4.0.0-alpha.5",
21
+ "@dynamic-labs/logger": "4.0.0-alpha.5",
22
+ "@dynamic-labs/multi-wallet": "4.0.0-alpha.5",
23
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.5",
24
+ "@dynamic-labs/store": "4.0.0-alpha.5",
25
+ "@dynamic-labs/types": "4.0.0-alpha.5",
26
+ "@dynamic-labs/utils": "4.0.0-alpha.5",
27
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.5",
28
+ "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.5",
30
29
  "eventemitter3": "5.0.1"
31
30
  },
32
31
  "devDependencies": {
@@ -29,8 +29,9 @@ const initAuth = (environmentId, providerType, oauthInitAuthRequest) => _tslib._
29
29
  providerType,
30
30
  });
31
31
  }
32
- catch (e) {
33
- logger.logger.error(e);
32
+ catch (err) {
33
+ logger.logger.error(err);
34
+ throw err;
34
35
  }
35
36
  });
36
37
  const verifyOAuth = (environmentId_1, providerType_1, _a) => _tslib.__awaiter(void 0, [environmentId_1, providerType_1, _a], void 0, function* (environmentId, providerType, { code, codeVerifier, state }) {
@@ -25,8 +25,9 @@ const initAuth = (environmentId, providerType, oauthInitAuthRequest) => __awaite
25
25
  providerType,
26
26
  });
27
27
  }
28
- catch (e) {
29
- logger.error(e);
28
+ catch (err) {
29
+ logger.error(err);
30
+ throw err;
30
31
  }
31
32
  });
32
33
  const verifyOAuth = (environmentId_1, providerType_1, _a) => __awaiter(void 0, [environmentId_1, providerType_1, _a], void 0, function* (environmentId, providerType, { code, codeVerifier, state }) {
@@ -1781,7 +1781,7 @@ const translation = {
1781
1781
  insufficient_funds: 'Insufficient funds due to gas price increase from estimate. Please add {{amountLeft}} {{currencySymbol}} to continue.',
1782
1782
  insufficient_gas_funds: 'Insufficient gas funds. Please add {{amountLeft}} {{currencySymbol}} to continue.',
1783
1783
  failed_simulation: 'Unable to simulate transaction, funds may be lost if submitted.',
1784
- not_enough_solana: 'Insufficient funds to process this transaction',
1784
+ not_enough_solana: 'Insufficient funds, your SOL balance after the transaction must be at least 0.001.',
1785
1785
  },
1786
1786
  error_message: {
1787
1787
  gas_not_sponsored: 'The gas fee has increased. Confirm if you still want to complete this transaction.',
@@ -1777,7 +1777,7 @@ const translation = {
1777
1777
  insufficient_funds: 'Insufficient funds due to gas price increase from estimate. Please add {{amountLeft}} {{currencySymbol}} to continue.',
1778
1778
  insufficient_gas_funds: 'Insufficient gas funds. Please add {{amountLeft}} {{currencySymbol}} to continue.',
1779
1779
  failed_simulation: 'Unable to simulate transaction, funds may be lost if submitted.',
1780
- not_enough_solana: 'Insufficient funds to process this transaction',
1780
+ not_enough_solana: 'Insufficient funds, your SOL balance after the transaction must be at least 0.001.',
1781
1781
  },
1782
1782
  error_message: {
1783
1783
  gas_not_sponsored: 'The gas fee has increased. Confirm if you still want to complete this transaction.',
@@ -118,6 +118,7 @@ const useWalletOptions = () => {
118
118
  return {
119
119
  group: option.group,
120
120
  groupName,
121
+ isInstalledOnBrowser: option.isInstalledOnBrowser,
121
122
  key: option.walletConnector.key,
122
123
  name: option.name,
123
124
  };
@@ -3,6 +3,7 @@ export declare const useWalletOptions: () => {
3
3
  walletOptions: {
4
4
  group: string | undefined;
5
5
  groupName: string | undefined;
6
+ isInstalledOnBrowser: boolean;
6
7
  key: string;
7
8
  name: string;
8
9
  }[];
@@ -114,6 +114,7 @@ const useWalletOptions = () => {
114
114
  return {
115
115
  group: option.group,
116
116
  groupName,
117
+ isInstalledOnBrowser: option.isInstalledOnBrowser,
117
118
  key: option.walletConnector.key,
118
119
  name: option.name,
119
120
  };
@@ -104,7 +104,10 @@ require('qrcode');
104
104
  const NoAccess = () => {
105
105
  const { deniedAddress, setDeniedAddress, setDeniedOauthProvider, deniedOauthProvider, deniedOauthUsername, } = AccessDeniedContext.useAccessDeniedContext();
106
106
  const { t } = reactI18next.useTranslation();
107
- const accessIcon = iconic.findSocialIcon(deniedOauthProvider);
107
+ // deniedOauthProvider can be undefined
108
+ const accessIcon = deniedOauthProvider
109
+ ? iconic.findSocialIcon(deniedOauthProvider)
110
+ : undefined;
108
111
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext.useInternalDynamicContext();
109
112
  const { displayedDestination: email } = VerificationContext.useVerification();
110
113
  const { goToInitialView } = ViewContext.useViewContext();
@@ -100,7 +100,10 @@ import 'qrcode';
100
100
  const NoAccess = () => {
101
101
  const { deniedAddress, setDeniedAddress, setDeniedOauthProvider, deniedOauthProvider, deniedOauthUsername, } = useAccessDeniedContext();
102
102
  const { t } = useTranslation();
103
- const accessIcon = findSocialIcon(deniedOauthProvider);
103
+ // deniedOauthProvider can be undefined
104
+ const accessIcon = deniedOauthProvider
105
+ ? findSocialIcon(deniedOauthProvider)
106
+ : undefined;
104
107
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext();
105
108
  const { displayedDestination: email } = useVerification();
106
109
  const { goToInitialView } = useViewContext();