@dynamic-labs/sdk-react-core 2.1.0-alpha.26 → 2.1.0-alpha.27

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,11 @@
1
1
 
2
+ ## [2.1.0-alpha.27](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.26...v2.1.0-alpha.27) (2024-05-29)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * coinbase connection ([#5764](https://github.com/dynamic-labs/DynamicAuth/issues/5764)) ([aeacd1c](https://github.com/dynamic-labs/DynamicAuth/commit/aeacd1c55dc471fbf8c14eb05ab356b0a90aa239))
8
+
2
9
  ## [2.1.0-alpha.26](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.25...v2.1.0-alpha.26) (2024-05-29)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.1.0-alpha.26";
6
+ var version = "2.1.0-alpha.27";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.453",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "2.1.0-alpha.26";
2
+ var version = "2.1.0-alpha.27";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.453",
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": "2.1.0-alpha.26",
3
+ "version": "2.1.0-alpha.27",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,18 +17,18 @@
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": "2.1.0-alpha.26",
21
- "@dynamic-labs/logger": "2.1.0-alpha.26",
22
- "@dynamic-labs/multi-wallet": "2.1.0-alpha.26",
23
- "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.26",
24
- "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.26",
25
- "@dynamic-labs/rpc-providers": "2.1.0-alpha.26",
26
- "@dynamic-labs/store": "2.1.0-alpha.26",
27
- "@dynamic-labs/types": "2.1.0-alpha.26",
28
- "@dynamic-labs/utils": "2.1.0-alpha.26",
29
- "@dynamic-labs/viem-utils": "2.1.0-alpha.26",
30
- "@dynamic-labs/wallet-book": "2.1.0-alpha.26",
31
- "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.26",
20
+ "@dynamic-labs/iconic": "2.1.0-alpha.27",
21
+ "@dynamic-labs/logger": "2.1.0-alpha.27",
22
+ "@dynamic-labs/multi-wallet": "2.1.0-alpha.27",
23
+ "@dynamic-labs/rpc-provider-ethereum": "2.1.0-alpha.27",
24
+ "@dynamic-labs/rpc-provider-solana": "2.1.0-alpha.27",
25
+ "@dynamic-labs/rpc-providers": "2.1.0-alpha.27",
26
+ "@dynamic-labs/store": "2.1.0-alpha.27",
27
+ "@dynamic-labs/types": "2.1.0-alpha.27",
28
+ "@dynamic-labs/utils": "2.1.0-alpha.27",
29
+ "@dynamic-labs/viem-utils": "2.1.0-alpha.27",
30
+ "@dynamic-labs/wallet-book": "2.1.0-alpha.27",
31
+ "@dynamic-labs/wallet-connector-core": "2.1.0-alpha.27",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "devDependencies": {
@@ -1 +0,0 @@
1
- export { useWalletsConnectionState } from './useWalletsConnectionState';
@@ -36,9 +36,8 @@ require('viem');
36
36
  require('viem/chains');
37
37
  var email = require('../../data/api/email/email.cjs');
38
38
  require('../../config/ApiEndpoint.cjs');
39
- require('@dynamic-labs/store');
39
+ var storeAuthTokenAndUser = require('../../store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.cjs');
40
40
  require('../../locale/locale.cjs');
41
- var updateJWTAndCreateUserProfile = require('../../utils/functions/updateJWTAndCreateUserProfile/updateJWTAndCreateUserProfile.cjs');
42
41
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
43
42
  require('../../context/AccountExistsContext/AccountExistsContext.cjs');
44
43
  require('../../context/UserWalletsContext/UserWalletsContext.cjs');
@@ -58,6 +57,7 @@ require('../../context/MockContext/MockContext.cjs');
58
57
  require('../CollectUserDataView/useFields.cjs');
59
58
  require('../../context/FieldsStateContext/FieldsStateContext.cjs');
60
59
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
60
+ require('@dynamic-labs/store');
61
61
  require('@dynamic-labs/rpc-providers');
62
62
  var Typography = require('../../components/Typography/Typography.cjs');
63
63
  require('../../context/FooterAnimationContext/index.cjs');
@@ -103,7 +103,7 @@ require('../../context/IpConfigurationContext/IpConfigurationContext.cjs');
103
103
  const SECONDS_TO_RETRY = 15;
104
104
  const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
105
105
  var _a, _b, _c, _d;
106
- const { environmentId, handleLogOut, setUser, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, unauthenticatedUser, } = useInternalDynamicContext.useInternalDynamicContext();
106
+ const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, unauthenticatedUser, } = useInternalDynamicContext.useInternalDynamicContext();
107
107
  const { view, setView, goToInitialView } = ViewContext.useViewContext();
108
108
  const { error, setError, setErrorMessage } = ErrorContext.useErrorContext();
109
109
  const { loading, setLoading } = LoadingContext.useLoadingContext();
@@ -155,7 +155,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
155
155
  hasTurnkeyVerifiedCredentialAuthenticator &&
156
156
  !hasRecoveryEmail &&
157
157
  ((_e = updateUserProfileResponse === null || updateUserProfileResponse === void 0 ? void 0 : updateUserProfileResponse.user) === null || _e === void 0 ? void 0 : _e.email)) {
158
- setUser(updateJWTAndCreateUserProfile.updateJWTAndCreateUserProfile(updateUserProfileResponse.jwt, updateUserProfileResponse.minifiedJwt));
158
+ storeAuthTokenAndUser.storeAuthTokenAndUser(updateUserProfileResponse);
159
159
  yield addRecoveryEmail(updateUserProfileResponse.user.email);
160
160
  setShowAuthFlow(false);
161
161
  return true;
@@ -203,8 +203,8 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
203
203
  (_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.embeddedWallets) === null || _d === void 0 ? void 0 : _d.forceAuthenticatorAtSignup,
204
204
  setPrimaryWalletId,
205
205
  setShowAuthFlow,
206
- setUser,
207
206
  setView,
207
+ user,
208
208
  ]);
209
209
  const handleComplete = React.useCallback((verificationToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
210
210
  setError(undefined);
@@ -32,9 +32,8 @@ import 'viem';
32
32
  import 'viem/chains';
33
33
  import { signInWithEmailVerification, retryEmailVerification } from '../../data/api/email/email.js';
34
34
  import '../../config/ApiEndpoint.js';
35
- import '@dynamic-labs/store';
35
+ import { storeAuthTokenAndUser } from '../../store/utils/storeAuthTokenAndUser/storeAuthTokenAndUser.js';
36
36
  import '../../locale/locale.js';
37
- import { updateJWTAndCreateUserProfile } from '../../utils/functions/updateJWTAndCreateUserProfile/updateJWTAndCreateUserProfile.js';
38
37
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
39
38
  import '../../context/AccountExistsContext/AccountExistsContext.js';
40
39
  import '../../context/UserWalletsContext/UserWalletsContext.js';
@@ -54,6 +53,7 @@ import '../../context/MockContext/MockContext.js';
54
53
  import '../CollectUserDataView/useFields.js';
55
54
  import '../../context/FieldsStateContext/FieldsStateContext.js';
56
55
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
56
+ import '@dynamic-labs/store';
57
57
  import '@dynamic-labs/rpc-providers';
58
58
  import { Typography } from '../../components/Typography/Typography.js';
59
59
  import '../../context/FooterAnimationContext/index.js';
@@ -99,7 +99,7 @@ import '../../context/IpConfigurationContext/IpConfigurationContext.js';
99
99
  const SECONDS_TO_RETRY = 15;
100
100
  const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
101
101
  var _a, _b, _c, _d;
102
- const { environmentId, handleLogOut, setUser, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, unauthenticatedUser, } = useInternalDynamicContext();
102
+ const { environmentId, handleLogOut, setPrimaryWalletId, setShowAuthFlow, projectSettings, user, unauthenticatedUser, } = useInternalDynamicContext();
103
103
  const { view, setView, goToInitialView } = useViewContext();
104
104
  const { error, setError, setErrorMessage } = useErrorContext();
105
105
  const { loading, setLoading } = useLoadingContext();
@@ -151,7 +151,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
151
151
  hasTurnkeyVerifiedCredentialAuthenticator &&
152
152
  !hasRecoveryEmail &&
153
153
  ((_e = updateUserProfileResponse === null || updateUserProfileResponse === void 0 ? void 0 : updateUserProfileResponse.user) === null || _e === void 0 ? void 0 : _e.email)) {
154
- setUser(updateJWTAndCreateUserProfile(updateUserProfileResponse.jwt, updateUserProfileResponse.minifiedJwt));
154
+ storeAuthTokenAndUser(updateUserProfileResponse);
155
155
  yield addRecoveryEmail(updateUserProfileResponse.user.email);
156
156
  setShowAuthFlow(false);
157
157
  return true;
@@ -199,8 +199,8 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
199
199
  (_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.embeddedWallets) === null || _d === void 0 ? void 0 : _d.forceAuthenticatorAtSignup,
200
200
  setPrimaryWalletId,
201
201
  setShowAuthFlow,
202
- setUser,
203
202
  setView,
203
+ user,
204
204
  ]);
205
205
  const handleComplete = useCallback((verificationToken) => __awaiter(void 0, void 0, void 0, function* () {
206
206
  setError(undefined);