@dynamic-labs/sdk-react-core 4.9.6 → 4.9.7

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
+ ### [4.9.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.6...v4.9.7) (2025-03-21)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * back button for metamask qr code ([#8343](https://github.com/dynamic-labs/dynamic-auth/issues/8343)) ([2a9defd](https://github.com/dynamic-labs/dynamic-auth/commit/2a9defdbb19dc9879e4967fbba28b3a98414105a))
8
+
2
9
  ### [4.9.6](https://github.com/dynamic-labs/dynamic-auth/compare/v4.9.5...v4.9.6) (2025-03-21)
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 = "4.9.6";
6
+ var version = "4.9.7";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.644",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "4.9.6";
2
+ var version = "4.9.7";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.644",
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.9.6",
3
+ "version": "4.9.7",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.644",
6
6
  "@hcaptcha/react-hcaptcha": "1.4.4",
@@ -14,16 +14,16 @@
14
14
  "yup": "0.32.11",
15
15
  "react-international-phone": "4.2.5",
16
16
  "bs58": "5.0.0",
17
- "@dynamic-labs/assert-package-version": "4.9.6",
18
- "@dynamic-labs/iconic": "4.9.6",
19
- "@dynamic-labs/logger": "4.9.6",
20
- "@dynamic-labs/multi-wallet": "4.9.6",
21
- "@dynamic-labs/rpc-providers": "4.9.6",
22
- "@dynamic-labs/store": "4.9.6",
23
- "@dynamic-labs/types": "4.9.6",
24
- "@dynamic-labs/utils": "4.9.6",
25
- "@dynamic-labs/wallet-book": "4.9.6",
26
- "@dynamic-labs/wallet-connector-core": "4.9.6",
17
+ "@dynamic-labs/assert-package-version": "4.9.7",
18
+ "@dynamic-labs/iconic": "4.9.7",
19
+ "@dynamic-labs/logger": "4.9.7",
20
+ "@dynamic-labs/multi-wallet": "4.9.7",
21
+ "@dynamic-labs/rpc-providers": "4.9.7",
22
+ "@dynamic-labs/store": "4.9.7",
23
+ "@dynamic-labs/types": "4.9.7",
24
+ "@dynamic-labs/utils": "4.9.7",
25
+ "@dynamic-labs/wallet-book": "4.9.7",
26
+ "@dynamic-labs/wallet-connector-core": "4.9.7",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
29
29
  "devDependencies": {
@@ -6,10 +6,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var _tslib = require('../../../../../_virtual/_tslib.cjs');
7
7
  var React = require('react');
8
8
  var utils = require('@dynamic-labs/utils');
9
- var sdkApiCore = require('@dynamic-labs/sdk-api-core');
10
9
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
11
10
  var localStorage = require('../../constants/localStorage.cjs');
12
11
  var utils$1 = require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.cjs');
12
+ require('@dynamic-labs/sdk-api-core');
13
13
  require('../../../config/ApiEndpoint.cjs');
14
14
  require('../../constants/values.cjs');
15
15
  require('@dynamic-labs/multi-wallet');
@@ -110,11 +110,10 @@ const useEmbeddedWalletSessionKeys = ({ environmentId, projectSettings, }) => {
110
110
  }
111
111
  return decodedSessionKeys === null || decodedSessionKeys === void 0 ? void 0 : decodedSessionKeys.publicKey;
112
112
  };
113
- const shouldRegisterSessionKeysOnSignin = () => {
114
- var _a;
115
- return ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.defaultWalletVersion) ===
116
- sdkApiCore.EmbeddedWalletVersionEnum.V2;
117
- };
113
+ // this is a temporary fix to ensure that session keys are registered on signin for all wallets
114
+ // the user is undefined at this point in the auth flow and we cant check the users wallet version
115
+ // so we just return true for now
116
+ const shouldRegisterSessionKeysOnSignin = () => true;
118
117
  const toEncodedFormat = (publicKey, privateKey, privateKeyJwk, registered, expirationDate) => {
119
118
  const sessionKeys = {
120
119
  expirationDate,
@@ -2,10 +2,10 @@
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
3
  import { useCallback } from 'react';
4
4
  import { StorageService, InvalidEmbeddedWalletSessionKeyError } from '@dynamic-labs/utils';
5
- import { EmbeddedWalletVersionEnum } from '@dynamic-labs/sdk-api-core';
6
5
  import { logger } from '@dynamic-labs/wallet-connector-core';
7
6
  import { SECURE_ENCLAVE_WALLET_SESSION_KEYS, SECURE_ENCLAVE_WALLET_SESSION_KEYS_STORAGE_OPTIONS } from '../../constants/localStorage.js';
8
7
  import { p256Sign, p256Keygen } from '../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.js';
8
+ import '@dynamic-labs/sdk-api-core';
9
9
  import '../../../config/ApiEndpoint.js';
10
10
  import '../../constants/values.js';
11
11
  import '@dynamic-labs/multi-wallet';
@@ -106,11 +106,10 @@ const useEmbeddedWalletSessionKeys = ({ environmentId, projectSettings, }) => {
106
106
  }
107
107
  return decodedSessionKeys === null || decodedSessionKeys === void 0 ? void 0 : decodedSessionKeys.publicKey;
108
108
  };
109
- const shouldRegisterSessionKeysOnSignin = () => {
110
- var _a;
111
- return ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.embeddedWallets) === null || _a === void 0 ? void 0 : _a.defaultWalletVersion) ===
112
- EmbeddedWalletVersionEnum.V2;
113
- };
109
+ // this is a temporary fix to ensure that session keys are registered on signin for all wallets
110
+ // the user is undefined at this point in the auth flow and we cant check the users wallet version
111
+ // so we just return true for now
112
+ const shouldRegisterSessionKeysOnSignin = () => true;
114
113
  const toEncodedFormat = (publicKey, privateKey, privateKeyJwk, registered, expirationDate) => {
115
114
  const sessionKeys = {
116
115
  expirationDate,
@@ -102,7 +102,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
102
102
  const { setMultiWalletWidgetState, setShowAuthFlow, setSelectedWalletConnectorKey, walletConnectorOptions, setQrcodeUri, setDesktopUri, user, linkedWallets, setLegacyIsVerifying, authMode, } = useInternalDynamicContext.useInternalDynamicContext();
103
103
  const { mockedSDK } = MockContext.useMockContext();
104
104
  const { setError, setErrorMessage } = ErrorContext.useErrorContext();
105
- const { pushView, clearStackAndPushInitialView } = ViewContext.useViewContext();
105
+ const { pushView, clearStackAndPushInitialView, replaceView } = ViewContext.useViewContext();
106
106
  const handleCustodialWalletClick = (walletConnector) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
107
107
  logger.logger.debug('handleCustodialWalletClick', walletConnector);
108
108
  const twoStepAuthentication = requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector);
@@ -149,7 +149,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
149
149
  logger.logger.debug('handleUninstalledClick', walletConnector);
150
150
  setSelectedWalletConnectorKey(walletConnector.key);
151
151
  if (!walletConnector.canConnectViaQrCode) {
152
- pushView('no-qr-not-installed');
152
+ replaceView('no-qr-not-installed');
153
153
  }
154
154
  else {
155
155
  onQrCodeConnect({
@@ -163,7 +163,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
163
163
  },
164
164
  walletConnector,
165
165
  });
166
- pushView('qr-code');
166
+ replaceView('qr-code');
167
167
  }
168
168
  setError(undefined);
169
169
  });
@@ -98,7 +98,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
98
98
  const { setMultiWalletWidgetState, setShowAuthFlow, setSelectedWalletConnectorKey, walletConnectorOptions, setQrcodeUri, setDesktopUri, user, linkedWallets, setLegacyIsVerifying, authMode, } = useInternalDynamicContext();
99
99
  const { mockedSDK } = useMockContext();
100
100
  const { setError, setErrorMessage } = useErrorContext();
101
- const { pushView, clearStackAndPushInitialView } = useViewContext();
101
+ const { pushView, clearStackAndPushInitialView, replaceView } = useViewContext();
102
102
  const handleCustodialWalletClick = (walletConnector) => __awaiter(void 0, void 0, void 0, function* () {
103
103
  logger.debug('handleCustodialWalletClick', walletConnector);
104
104
  const twoStepAuthentication = requiresTwoStepAuthentication(walletConnector);
@@ -145,7 +145,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
145
145
  logger.debug('handleUninstalledClick', walletConnector);
146
146
  setSelectedWalletConnectorKey(walletConnector.key);
147
147
  if (!walletConnector.canConnectViaQrCode) {
148
- pushView('no-qr-not-installed');
148
+ replaceView('no-qr-not-installed');
149
149
  }
150
150
  else {
151
151
  onQrCodeConnect({
@@ -159,7 +159,7 @@ const useHandleWalletItem = ({ allowAlreadyConnectedWallet, onQrCodeConnect, onC
159
159
  },
160
160
  walletConnector,
161
161
  });
162
- pushView('qr-code');
162
+ replaceView('qr-code');
163
163
  }
164
164
  setError(undefined);
165
165
  });