@dynamic-labs/sdk-react-core 2.3.7 → 2.3.8
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 +8 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +2 -2
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +13 -6
- package/src/lib/context/DynamicContext/DynamicContext.js +13 -6
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/types.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext/useDynamicContext.js +2 -1
- package/src/lib/locale/en/translation.cjs +5 -0
- package/src/lib/locale/en/translation.d.ts +5 -0
- package/src/lib/locale/en/translation.js +5 -0
- package/src/lib/store/hooks/useUser/useUser.cjs +3 -3
- package/src/lib/store/hooks/useUser/useUser.d.ts +2 -2
- package/src/lib/store/hooks/useUser/useUser.js +3 -3
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +1 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +3 -3
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +2 -2
- package/src/lib/utils/hooks/useMfa/useMfa.js +2 -2
- package/src/lib/utils/hooks/useResetCookieLocalStorage/index.d.ts +1 -0
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.cjs +133 -0
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.d.ts +8 -0
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.js +129 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +7 -7
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +7 -7
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +3 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +3 -3
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -4
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +3 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +3 -3
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +3 -3
- package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +3 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +22 -5
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +23 -6
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +2 -2
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +2 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +3 -3
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.3.8](https://github.com/dynamic-labs/DynamicAuth/compare/v2.3.7...v2.3.8) (2024-08-02)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* fetch user on refresh from backend when cookie-enabled and user not in local storage ([#6472](https://github.com/dynamic-labs/DynamicAuth/issues/6472)) ([7300a21](https://github.com/dynamic-labs/DynamicAuth/commit/7300a21d81d51ef1fc93af12d1081b5c1d57b578))
|
|
8
|
+
* stop filtering wallet connect on keyword "wallet" ([#6476](https://github.com/dynamic-labs/DynamicAuth/issues/6476)) ([fc1be36](https://github.com/dynamic-labs/DynamicAuth/commit/fc1be36b0370f876dcfe4e84e25ee60cf9682306)), closes [#6475](https://github.com/dynamic-labs/DynamicAuth/issues/6475)
|
|
9
|
+
|
|
2
10
|
### [2.3.7](https://github.com/dynamic-labs/DynamicAuth/compare/v2.3.6...v2.3.7) (2024-07-26)
|
|
3
11
|
|
|
4
12
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
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.3.
|
|
21
|
-
"@dynamic-labs/logger": "2.3.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "2.3.
|
|
23
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.3.
|
|
24
|
-
"@dynamic-labs/rpc-provider-solana": "2.3.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "2.3.
|
|
26
|
-
"@dynamic-labs/store": "2.3.
|
|
27
|
-
"@dynamic-labs/types": "2.3.
|
|
28
|
-
"@dynamic-labs/utils": "2.3.
|
|
29
|
-
"@dynamic-labs/viem-utils": "2.3.
|
|
30
|
-
"@dynamic-labs/wallet-book": "2.3.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "2.3.
|
|
20
|
+
"@dynamic-labs/iconic": "2.3.8",
|
|
21
|
+
"@dynamic-labs/logger": "2.3.8",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "2.3.8",
|
|
23
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.3.8",
|
|
24
|
+
"@dynamic-labs/rpc-provider-solana": "2.3.8",
|
|
25
|
+
"@dynamic-labs/rpc-providers": "2.3.8",
|
|
26
|
+
"@dynamic-labs/store": "2.3.8",
|
|
27
|
+
"@dynamic-labs/types": "2.3.8",
|
|
28
|
+
"@dynamic-labs/utils": "2.3.8",
|
|
29
|
+
"@dynamic-labs/viem-utils": "2.3.8",
|
|
30
|
+
"@dynamic-labs/wallet-book": "2.3.8",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "2.3.8",
|
|
32
32
|
"eventemitter3": "5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -113,7 +113,7 @@ const getMagicEmailOrSocialIcon = ({ findSocialIcon, wallet, user, }) => {
|
|
|
113
113
|
};
|
|
114
114
|
const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
115
115
|
var _a, _b;
|
|
116
|
-
const { primaryWallet, selectedWalletConnector, user,
|
|
116
|
+
const { primaryWallet, selectedWalletConnector, user, userWithMissingInfo } = useInternalDynamicContext.useInternalDynamicContext();
|
|
117
117
|
const { deniedOauthProvider, deniedAddress } = AccessDeniedContext.useAccessDeniedContext();
|
|
118
118
|
const { isLoadingEmbeddedWallet } = WalletContext.useWalletContext();
|
|
119
119
|
const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
|
|
@@ -140,7 +140,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
|
140
140
|
}
|
|
141
141
|
const MagicEmailOrSocialIcon = getMagicEmailOrSocialIcon({
|
|
142
142
|
findSocialIcon,
|
|
143
|
-
user: user !== null && user !== void 0 ? user :
|
|
143
|
+
user: user !== null && user !== void 0 ? user : userWithMissingInfo,
|
|
144
144
|
wallet: walletForIcon,
|
|
145
145
|
});
|
|
146
146
|
const isEmbeddedWallet = (_b = (_a = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('turnkey');
|
|
@@ -109,7 +109,7 @@ const getMagicEmailOrSocialIcon = ({ findSocialIcon, wallet, user, }) => {
|
|
|
109
109
|
};
|
|
110
110
|
const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
111
111
|
var _a, _b;
|
|
112
|
-
const { primaryWallet, selectedWalletConnector, user,
|
|
112
|
+
const { primaryWallet, selectedWalletConnector, user, userWithMissingInfo } = useInternalDynamicContext();
|
|
113
113
|
const { deniedOauthProvider, deniedAddress } = useAccessDeniedContext();
|
|
114
114
|
const { isLoadingEmbeddedWallet } = useWalletContext();
|
|
115
115
|
const findSocialIcon = useFindSocialIcon();
|
|
@@ -136,7 +136,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
|
136
136
|
}
|
|
137
137
|
const MagicEmailOrSocialIcon = getMagicEmailOrSocialIcon({
|
|
138
138
|
findSocialIcon,
|
|
139
|
-
user: user !== null && user !== void 0 ? user :
|
|
139
|
+
user: user !== null && user !== void 0 ? user : userWithMissingInfo,
|
|
140
140
|
wallet: walletForIcon,
|
|
141
141
|
});
|
|
142
142
|
const isEmbeddedWallet = (_b = (_a = walletForIcon === null || walletForIcon === void 0 ? void 0 : walletForIcon.connector) === null || _a === void 0 ? void 0 : _a.key) === null || _b === void 0 ? void 0 : _b.startsWith('turnkey');
|
|
@@ -66,6 +66,7 @@ var useSetWalletConnectorFetchers = require('../../utils/hooks/useSetWalletConne
|
|
|
66
66
|
var useSendDynamicProps = require('../../utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs');
|
|
67
67
|
var MfaSettingsContext = require('../MfaSettingsContext/MfaSettingsContext.cjs');
|
|
68
68
|
var WalletGroupContext = require('../WalletGroupContext/WalletGroupContext.cjs');
|
|
69
|
+
var useResetCookieLocalStorage = require('../../utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.cjs');
|
|
69
70
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
70
71
|
require('../../components/IconButton/IconButton.cjs');
|
|
71
72
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
@@ -191,7 +192,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
191
192
|
// Alows clients to control the Bridget Widget flow without need to click on Bridge Widget
|
|
192
193
|
const [showBridgeWidget, setShowBridgeWidget] = React.useState(false);
|
|
193
194
|
const [isSingleWalletAccount, setIsSingleWalletAccount] = React.useState(false);
|
|
194
|
-
const { user,
|
|
195
|
+
const { user, userWithMissingInfo } = useUser.useUser();
|
|
195
196
|
const isAuthenticated = useIsAuthenticated.useIsAuthenticated(user);
|
|
196
197
|
try {
|
|
197
198
|
if (user) {
|
|
@@ -288,7 +289,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
288
289
|
const { selectedWalletConnector, setSelectedWalletConnectorKey } = useSelectedWalletConnector.useSelectedWalletConnector({ walletConnectorOptions });
|
|
289
290
|
//selected wallet to perform an action (become primary, unlink, etc)
|
|
290
291
|
const [selectedWalletWithAction, setSelectedWalletWithAction] = React.useState(null);
|
|
291
|
-
useSetWalletConnectorVerifiedCredentials.useSetWalletConnectorVerifiedCredentials(user !== null && user !== void 0 ? user :
|
|
292
|
+
useSetWalletConnectorVerifiedCredentials.useSetWalletConnectorVerifiedCredentials(user !== null && user !== void 0 ? user : userWithMissingInfo, walletConnectorOptions);
|
|
292
293
|
useSetWalletConnectorFetchers.useSetWalletConnectorFetchers(walletConnectorOptions, environmentId);
|
|
293
294
|
const { didConnectedStateLoad, primaryWallet, showQrcodeModal, secondaryWallets, setPrimaryWallet, setShowQrcodeModal, wallets: linkedOrConnectedWallets, } = useWalletConnectors.useWalletConnectors({
|
|
294
295
|
authMode,
|
|
@@ -300,7 +301,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
300
301
|
setMultiWalletWidgetState,
|
|
301
302
|
setPrimaryWalletId,
|
|
302
303
|
setQrcodeUri,
|
|
303
|
-
user: user ||
|
|
304
|
+
user: user || userWithMissingInfo,
|
|
304
305
|
walletBook: walletBook$1,
|
|
305
306
|
walletConnectorOptions,
|
|
306
307
|
});
|
|
@@ -316,7 +317,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
316
317
|
enableInstrumentation,
|
|
317
318
|
primaryWallet,
|
|
318
319
|
projectSettings,
|
|
319
|
-
user: user !== null && user !== void 0 ? user :
|
|
320
|
+
user: user !== null && user !== void 0 ? user : userWithMissingInfo,
|
|
320
321
|
walletBook: walletBook$1,
|
|
321
322
|
});
|
|
322
323
|
const { getNameService, removeConnectedNameService } = useNameService.useNameService({
|
|
@@ -341,6 +342,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
341
342
|
setAuthMode,
|
|
342
343
|
setLegacyIsVerifying,
|
|
343
344
|
setMultiWalletWidgetState,
|
|
345
|
+
setSelectedWalletConnectorKey,
|
|
344
346
|
setShowAuthFlow,
|
|
345
347
|
setShowBridgeWidget,
|
|
346
348
|
setShowDynamicUserProfile,
|
|
@@ -351,6 +353,11 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
351
353
|
environmentId,
|
|
352
354
|
handleLogOut,
|
|
353
355
|
});
|
|
356
|
+
useResetCookieLocalStorage.useResetCookieLocalStorage({
|
|
357
|
+
environmentId,
|
|
358
|
+
projectSettings,
|
|
359
|
+
setPrimaryWalletId,
|
|
360
|
+
});
|
|
354
361
|
// Ties all client callbacks to dynamic's events, such that
|
|
355
362
|
// when our events are triggered, so are the client callbacks
|
|
356
363
|
useTieCallbacksToEvents.useTieCallbacksToEvents({
|
|
@@ -558,8 +565,8 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
558
565
|
termsOfServiceUrl,
|
|
559
566
|
theme,
|
|
560
567
|
toolkitEnabled,
|
|
561
|
-
unauthenticatedUser,
|
|
562
568
|
user,
|
|
569
|
+
userWithMissingInfo,
|
|
563
570
|
walletConnector: (_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _b !== void 0 ? _b : null,
|
|
564
571
|
walletConnectorOptions,
|
|
565
572
|
walletUiUtils,
|
|
@@ -671,7 +678,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
671
678
|
termsOfServiceUrl,
|
|
672
679
|
theme,
|
|
673
680
|
toolkitEnabled,
|
|
674
|
-
|
|
681
|
+
userWithMissingInfo,
|
|
675
682
|
walletConnectorOptions,
|
|
676
683
|
walletUiUtils,
|
|
677
684
|
walletsFilter,
|
|
@@ -62,6 +62,7 @@ import { useSetWalletConnectorFetchers } from '../../utils/hooks/useSetWalletCon
|
|
|
62
62
|
import { useSendDynamicProps } from '../../utils/hooks/useSendDynamicProps/useSendDynamicProps.js';
|
|
63
63
|
import { MfaSettingsContextProvider } from '../MfaSettingsContext/MfaSettingsContext.js';
|
|
64
64
|
import { WalletGroupContextProvider } from '../WalletGroupContext/WalletGroupContext.js';
|
|
65
|
+
import { useResetCookieLocalStorage } from '../../utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.js';
|
|
65
66
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
66
67
|
import '../../components/IconButton/IconButton.js';
|
|
67
68
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
@@ -187,7 +188,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
187
188
|
// Alows clients to control the Bridget Widget flow without need to click on Bridge Widget
|
|
188
189
|
const [showBridgeWidget, setShowBridgeWidget] = useState(false);
|
|
189
190
|
const [isSingleWalletAccount, setIsSingleWalletAccount] = useState(false);
|
|
190
|
-
const { user,
|
|
191
|
+
const { user, userWithMissingInfo } = useUser();
|
|
191
192
|
const isAuthenticated = useIsAuthenticated(user);
|
|
192
193
|
try {
|
|
193
194
|
if (user) {
|
|
@@ -284,7 +285,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
284
285
|
const { selectedWalletConnector, setSelectedWalletConnectorKey } = useSelectedWalletConnector({ walletConnectorOptions });
|
|
285
286
|
//selected wallet to perform an action (become primary, unlink, etc)
|
|
286
287
|
const [selectedWalletWithAction, setSelectedWalletWithAction] = useState(null);
|
|
287
|
-
useSetWalletConnectorVerifiedCredentials(user !== null && user !== void 0 ? user :
|
|
288
|
+
useSetWalletConnectorVerifiedCredentials(user !== null && user !== void 0 ? user : userWithMissingInfo, walletConnectorOptions);
|
|
288
289
|
useSetWalletConnectorFetchers(walletConnectorOptions, environmentId);
|
|
289
290
|
const { didConnectedStateLoad, primaryWallet, showQrcodeModal, secondaryWallets, setPrimaryWallet, setShowQrcodeModal, wallets: linkedOrConnectedWallets, } = useWalletConnectors({
|
|
290
291
|
authMode,
|
|
@@ -296,7 +297,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
296
297
|
setMultiWalletWidgetState,
|
|
297
298
|
setPrimaryWalletId,
|
|
298
299
|
setQrcodeUri,
|
|
299
|
-
user: user ||
|
|
300
|
+
user: user || userWithMissingInfo,
|
|
300
301
|
walletBook,
|
|
301
302
|
walletConnectorOptions,
|
|
302
303
|
});
|
|
@@ -312,7 +313,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
312
313
|
enableInstrumentation,
|
|
313
314
|
primaryWallet,
|
|
314
315
|
projectSettings,
|
|
315
|
-
user: user !== null && user !== void 0 ? user :
|
|
316
|
+
user: user !== null && user !== void 0 ? user : userWithMissingInfo,
|
|
316
317
|
walletBook,
|
|
317
318
|
});
|
|
318
319
|
const { getNameService, removeConnectedNameService } = useNameService({
|
|
@@ -337,6 +338,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
337
338
|
setAuthMode,
|
|
338
339
|
setLegacyIsVerifying,
|
|
339
340
|
setMultiWalletWidgetState,
|
|
341
|
+
setSelectedWalletConnectorKey,
|
|
340
342
|
setShowAuthFlow,
|
|
341
343
|
setShowBridgeWidget,
|
|
342
344
|
setShowDynamicUserProfile,
|
|
@@ -347,6 +349,11 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
347
349
|
environmentId,
|
|
348
350
|
handleLogOut,
|
|
349
351
|
});
|
|
352
|
+
useResetCookieLocalStorage({
|
|
353
|
+
environmentId,
|
|
354
|
+
projectSettings,
|
|
355
|
+
setPrimaryWalletId,
|
|
356
|
+
});
|
|
350
357
|
// Ties all client callbacks to dynamic's events, such that
|
|
351
358
|
// when our events are triggered, so are the client callbacks
|
|
352
359
|
useTieCallbacksToEvents({
|
|
@@ -554,8 +561,8 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
554
561
|
termsOfServiceUrl,
|
|
555
562
|
theme,
|
|
556
563
|
toolkitEnabled,
|
|
557
|
-
unauthenticatedUser,
|
|
558
564
|
user,
|
|
565
|
+
userWithMissingInfo,
|
|
559
566
|
walletConnector: (_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _b !== void 0 ? _b : null,
|
|
560
567
|
walletConnectorOptions,
|
|
561
568
|
walletUiUtils,
|
|
@@ -667,7 +674,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
667
674
|
termsOfServiceUrl,
|
|
668
675
|
theme,
|
|
669
676
|
toolkitEnabled,
|
|
670
|
-
|
|
677
|
+
userWithMissingInfo,
|
|
671
678
|
walletConnectorOptions,
|
|
672
679
|
walletUiUtils,
|
|
673
680
|
walletsFilter,
|
|
@@ -8,6 +8,7 @@ import { SetShowAuthFlow } from '../useShowAuthFlow';
|
|
|
8
8
|
export type UseHandleLogoutParams = {
|
|
9
9
|
clearAllWalletConnectSessions: () => void;
|
|
10
10
|
bridgeChains: ChainsToConnect[] | undefined;
|
|
11
|
+
setSelectedWalletConnectorKey: Dispatch<SetStateAction<string | null>>;
|
|
11
12
|
setShowDynamicUserProfile: Dispatch<SetStateAction<boolean>>;
|
|
12
13
|
setShowBridgeWidget: Dispatch<SetStateAction<boolean>>;
|
|
13
14
|
user: UserProfile | undefined;
|
|
@@ -94,6 +94,7 @@ const useHandleLogout = (params) => {
|
|
|
94
94
|
paramsRef.current = params;
|
|
95
95
|
const logout = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
96
96
|
const p = paramsRef.current;
|
|
97
|
+
p.setSelectedWalletConnectorKey(null);
|
|
97
98
|
p.clearAllWalletConnectSessions();
|
|
98
99
|
p.setShowDynamicUserProfile(false);
|
|
99
100
|
p.setShowBridgeWidget(false);
|
|
@@ -90,6 +90,7 @@ const useHandleLogout = (params) => {
|
|
|
90
90
|
paramsRef.current = params;
|
|
91
91
|
const logout = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
92
|
const p = paramsRef.current;
|
|
93
|
+
p.setSelectedWalletConnectorKey(null);
|
|
93
94
|
p.clearAllWalletConnectSessions();
|
|
94
95
|
p.setShowDynamicUserProfile(false);
|
|
95
96
|
p.setShowBridgeWidget(false);
|
|
@@ -195,7 +195,7 @@ export interface IDynamicContext {
|
|
|
195
195
|
theme?: ThemeData | ThemeSetting;
|
|
196
196
|
toolkitEnabled?: boolean;
|
|
197
197
|
user: UserProfile | undefined;
|
|
198
|
-
|
|
198
|
+
userWithMissingInfo: UserProfile | undefined;
|
|
199
199
|
walletConnector: WalletConnector | null;
|
|
200
200
|
walletConnectorOptions: WalletOption[];
|
|
201
201
|
walletUiUtils: WalletUiUtils<WalletConnector>;
|
|
@@ -13,7 +13,7 @@ const useDynamicContext = () => {
|
|
|
13
13
|
if (context === undefined) {
|
|
14
14
|
throw new Error('useDynamicContext must be used within a DynamicContextProvider');
|
|
15
15
|
}
|
|
16
|
-
const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, setDefaultTabIndex, selectedTabIndex, setSelectedTabIndex, } = context;
|
|
16
|
+
const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, setDefaultTabIndex, selectedTabIndex, setSelectedTabIndex, } = context;
|
|
17
17
|
const { setAuthMode } = useOverrides.useOverrides(context);
|
|
18
18
|
return {
|
|
19
19
|
accountSwitchState,
|
|
@@ -60,6 +60,7 @@ const useDynamicContext = () => {
|
|
|
60
60
|
showDynamicUserProfile,
|
|
61
61
|
showQrcodeModal,
|
|
62
62
|
user,
|
|
63
|
+
userWithMissingInfo,
|
|
63
64
|
walletConnector,
|
|
64
65
|
walletConnectorOptions,
|
|
65
66
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { IDynamicContext } from '../types';
|
|
3
|
-
export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setPrimaryWallet' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile' | 'setAuthMode' | 'minAuthToken' | 'setDefaultTabIndex' | 'selectedTabIndex' | 'setSelectedTabIndex'> & {
|
|
3
|
+
export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setPrimaryWallet' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'userWithMissingInfo' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile' | 'setAuthMode' | 'minAuthToken' | 'setDefaultTabIndex' | 'selectedTabIndex' | 'setSelectedTabIndex'> & {
|
|
4
4
|
setShowAuthFlow: Dispatch<SetStateAction<boolean>>;
|
|
5
5
|
};
|
|
6
6
|
export declare const useDynamicContext: () => UseDynamicContext;
|
|
@@ -9,7 +9,7 @@ const useDynamicContext = () => {
|
|
|
9
9
|
if (context === undefined) {
|
|
10
10
|
throw new Error('useDynamicContext must be used within a DynamicContextProvider');
|
|
11
11
|
}
|
|
12
|
-
const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, setDefaultTabIndex, selectedTabIndex, setSelectedTabIndex, } = context;
|
|
12
|
+
const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, userWithMissingInfo, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, minAuthToken, setDefaultTabIndex, selectedTabIndex, setSelectedTabIndex, } = context;
|
|
13
13
|
const { setAuthMode } = useOverrides(context);
|
|
14
14
|
return {
|
|
15
15
|
accountSwitchState,
|
|
@@ -56,6 +56,7 @@ const useDynamicContext = () => {
|
|
|
56
56
|
showDynamicUserProfile,
|
|
57
57
|
showQrcodeModal,
|
|
58
58
|
user,
|
|
59
|
+
userWithMissingInfo,
|
|
59
60
|
walletConnector,
|
|
60
61
|
walletConnectorOptions,
|
|
61
62
|
};
|
|
@@ -1045,6 +1045,9 @@ const translation = {
|
|
|
1045
1045
|
* @description copy keys for network not supported view for manual switch
|
|
1046
1046
|
* @default
|
|
1047
1047
|
* {
|
|
1048
|
+
subtitle_network_defined_metamaskstarknet:
|
|
1049
|
+
'To continue, please update the network in your wallet to {{network}} by visiting the Starknet Snap companion app',
|
|
1050
|
+
subtitle_network_defined_metamaskstarknet_companion_app: 'companion app',
|
|
1048
1051
|
subtitle_network_defined: 'To continue, please update the network in your wallet to {{network}}',
|
|
1049
1052
|
subtitle_no_network_defined: 'Your wallet does not support switching networks from this app. Switch networks directly in your wallet.',
|
|
1050
1053
|
title: 'Update your Network',
|
|
@@ -1052,6 +1055,8 @@ const translation = {
|
|
|
1052
1055
|
}
|
|
1053
1056
|
*/
|
|
1054
1057
|
dyn_network_not_supported_manual_switch: {
|
|
1058
|
+
subtitle_network_defined_metamaskstarknet: 'To continue, please update the network in your wallet to {{network}} by visiting the Starknet Snap',
|
|
1059
|
+
subtitle_network_defined_metamaskstarknet_companion_app: 'companion app',
|
|
1055
1060
|
subtitle_network_defined: 'To continue, please update the network in your wallet to {{network}}',
|
|
1056
1061
|
subtitle_no_network_defined: 'Your wallet does not support switching networks from this app. Switch networks directly in your wallet.',
|
|
1057
1062
|
title: 'Update your Network',
|
|
@@ -1041,6 +1041,9 @@ export declare const translation: {
|
|
|
1041
1041
|
* @description copy keys for network not supported view for manual switch
|
|
1042
1042
|
* @default
|
|
1043
1043
|
* {
|
|
1044
|
+
subtitle_network_defined_metamaskstarknet:
|
|
1045
|
+
'To continue, please update the network in your wallet to {{network}} by visiting the Starknet Snap companion app',
|
|
1046
|
+
subtitle_network_defined_metamaskstarknet_companion_app: 'companion app',
|
|
1044
1047
|
subtitle_network_defined: 'To continue, please update the network in your wallet to {{network}}',
|
|
1045
1048
|
subtitle_no_network_defined: 'Your wallet does not support switching networks from this app. Switch networks directly in your wallet.',
|
|
1046
1049
|
title: 'Update your Network',
|
|
@@ -1048,6 +1051,8 @@ export declare const translation: {
|
|
|
1048
1051
|
}
|
|
1049
1052
|
*/
|
|
1050
1053
|
dyn_network_not_supported_manual_switch: {
|
|
1054
|
+
subtitle_network_defined_metamaskstarknet: string;
|
|
1055
|
+
subtitle_network_defined_metamaskstarknet_companion_app: string;
|
|
1051
1056
|
subtitle_network_defined: string;
|
|
1052
1057
|
subtitle_no_network_defined: string;
|
|
1053
1058
|
title: string;
|
|
@@ -1041,6 +1041,9 @@ const translation = {
|
|
|
1041
1041
|
* @description copy keys for network not supported view for manual switch
|
|
1042
1042
|
* @default
|
|
1043
1043
|
* {
|
|
1044
|
+
subtitle_network_defined_metamaskstarknet:
|
|
1045
|
+
'To continue, please update the network in your wallet to {{network}} by visiting the Starknet Snap companion app',
|
|
1046
|
+
subtitle_network_defined_metamaskstarknet_companion_app: 'companion app',
|
|
1044
1047
|
subtitle_network_defined: 'To continue, please update the network in your wallet to {{network}}',
|
|
1045
1048
|
subtitle_no_network_defined: 'Your wallet does not support switching networks from this app. Switch networks directly in your wallet.',
|
|
1046
1049
|
title: 'Update your Network',
|
|
@@ -1048,6 +1051,8 @@ const translation = {
|
|
|
1048
1051
|
}
|
|
1049
1052
|
*/
|
|
1050
1053
|
dyn_network_not_supported_manual_switch: {
|
|
1054
|
+
subtitle_network_defined_metamaskstarknet: 'To continue, please update the network in your wallet to {{network}} by visiting the Starknet Snap',
|
|
1055
|
+
subtitle_network_defined_metamaskstarknet_companion_app: 'companion app',
|
|
1051
1056
|
subtitle_network_defined: 'To continue, please update the network in your wallet to {{network}}',
|
|
1052
1057
|
subtitle_no_network_defined: 'Your wallet does not support switching networks from this app. Switch networks directly in your wallet.',
|
|
1053
1058
|
title: 'Update your Network',
|
|
@@ -9,14 +9,14 @@ var useStoreWithSelector = require('../useStoreWithSelector/useStoreWithSelector
|
|
|
9
9
|
const useUser = () => {
|
|
10
10
|
var _a, _b;
|
|
11
11
|
const userFromStore = useStoreWithSelector.useStoreWithSelector(store.getStore(), ({ user }) => user);
|
|
12
|
-
// adding
|
|
12
|
+
// adding userWithMissingInfo to avoid breaking changes for customer who consider that when we have a user,
|
|
13
13
|
// it means that they are already fully authenticated.
|
|
14
14
|
// since we won't have onboarding jwt anymore, the idea is to just store the user in LS and either use the user state
|
|
15
|
-
// or
|
|
15
|
+
// or userWithMissingInfo, depending on the value of missing fields or mfa required.
|
|
16
16
|
// this is just following our existing logic of how we handle authToken vs onboardingOnlyToken.
|
|
17
17
|
if (((_a = userFromStore === null || userFromStore === void 0 ? void 0 : userFromStore.missingFields) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
18
18
|
((_b = userFromStore === null || userFromStore === void 0 ? void 0 : userFromStore.scope) === null || _b === void 0 ? void 0 : _b.includes('requiresAdditionalAuth'))) {
|
|
19
|
-
return {
|
|
19
|
+
return { userWithMissingInfo: userFromStore };
|
|
20
20
|
}
|
|
21
21
|
return { user: userFromStore };
|
|
22
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const useUser: () => {
|
|
2
|
-
|
|
2
|
+
userWithMissingInfo: import("dist/packages/types/src").UserProfile;
|
|
3
3
|
user?: undefined;
|
|
4
4
|
} | {
|
|
5
5
|
user: import("dist/packages/types/src").UserProfile | undefined;
|
|
6
|
-
|
|
6
|
+
userWithMissingInfo?: undefined;
|
|
7
7
|
};
|
|
@@ -5,14 +5,14 @@ import { useStoreWithSelector } from '../useStoreWithSelector/useStoreWithSelect
|
|
|
5
5
|
const useUser = () => {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
const userFromStore = useStoreWithSelector(getStore(), ({ user }) => user);
|
|
8
|
-
// adding
|
|
8
|
+
// adding userWithMissingInfo to avoid breaking changes for customer who consider that when we have a user,
|
|
9
9
|
// it means that they are already fully authenticated.
|
|
10
10
|
// since we won't have onboarding jwt anymore, the idea is to just store the user in LS and either use the user state
|
|
11
|
-
// or
|
|
11
|
+
// or userWithMissingInfo, depending on the value of missing fields or mfa required.
|
|
12
12
|
// this is just following our existing logic of how we handle authToken vs onboardingOnlyToken.
|
|
13
13
|
if (((_a = userFromStore === null || userFromStore === void 0 ? void 0 : userFromStore.missingFields) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
14
14
|
((_b = userFromStore === null || userFromStore === void 0 ? void 0 : userFromStore.scope) === null || _b === void 0 ? void 0 : _b.includes('requiresAdditionalAuth'))) {
|
|
15
|
-
return {
|
|
15
|
+
return { userWithMissingInfo: userFromStore };
|
|
16
16
|
}
|
|
17
17
|
return { user: userFromStore };
|
|
18
18
|
};
|
|
@@ -134,7 +134,7 @@ const orderAndFilterList = (walletList, walletsFilter, isWalletConnectList, reco
|
|
|
134
134
|
return sortedWalletList;
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
-
const KEEP_WALLETS_NAME_LIST = ['
|
|
137
|
+
const KEEP_WALLETS_NAME_LIST = ['walletconnect', 'bitcoin.com wallet'];
|
|
138
138
|
const applySearchFilterToWalletOptionList = (rawSearchFilter, walletOptionList) => {
|
|
139
139
|
const searchFilter = rawSearchFilter.trim().toLowerCase();
|
|
140
140
|
const cleanName = (name) => {
|
|
@@ -130,7 +130,7 @@ const orderAndFilterList = (walletList, walletsFilter, isWalletConnectList, reco
|
|
|
130
130
|
return sortedWalletList;
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
const KEEP_WALLETS_NAME_LIST = ['
|
|
133
|
+
const KEEP_WALLETS_NAME_LIST = ['walletconnect', 'bitcoin.com wallet'];
|
|
134
134
|
const applySearchFilterToWalletOptionList = (rawSearchFilter, walletOptionList) => {
|
|
135
135
|
const searchFilter = rawSearchFilter.trim().toLowerCase();
|
|
136
136
|
const cleanName = (name) => {
|
|
@@ -89,11 +89,11 @@ require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/Passke
|
|
|
89
89
|
* This is to avoid a circular logic issue, as handleVerificationRequired needs to use the logic in this file as well.
|
|
90
90
|
*/
|
|
91
91
|
const useOtpVerificationRequestRaw = () => {
|
|
92
|
-
const { environmentId, user,
|
|
92
|
+
const { environmentId, user, userWithMissingInfo } = useInternalDynamicContext.useInternalDynamicContext();
|
|
93
93
|
const { verificationUUID: contextVerificationUUID } = VerificationContext.useVerification();
|
|
94
94
|
const verifyOtp = React.useCallback((handleVerificationRequired, verificationToken, destination, localVerificationUUID) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
95
95
|
var _a;
|
|
96
|
-
if (!user && !
|
|
96
|
+
if (!user && !userWithMissingInfo)
|
|
97
97
|
throw new utils.DynamicError(errors.USER_NOT_LOGGED_IN);
|
|
98
98
|
// VerificationUUID is saved in the context in case the view changes
|
|
99
99
|
// after a profile update (changing the view from edit profile to verify email)
|
|
@@ -123,7 +123,7 @@ const useOtpVerificationRequestRaw = () => {
|
|
|
123
123
|
missingFields,
|
|
124
124
|
updateUserProfileResponse: updateSelfResponse,
|
|
125
125
|
};
|
|
126
|
-
}), [contextVerificationUUID, environmentId, user,
|
|
126
|
+
}), [contextVerificationUUID, environmentId, user, userWithMissingInfo]);
|
|
127
127
|
return { verifyOtp };
|
|
128
128
|
};
|
|
129
129
|
/**
|
|
@@ -85,11 +85,11 @@ import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/Passkey
|
|
|
85
85
|
* This is to avoid a circular logic issue, as handleVerificationRequired needs to use the logic in this file as well.
|
|
86
86
|
*/
|
|
87
87
|
const useOtpVerificationRequestRaw = () => {
|
|
88
|
-
const { environmentId, user,
|
|
88
|
+
const { environmentId, user, userWithMissingInfo } = useInternalDynamicContext();
|
|
89
89
|
const { verificationUUID: contextVerificationUUID } = useVerification();
|
|
90
90
|
const verifyOtp = useCallback((handleVerificationRequired, verificationToken, destination, localVerificationUUID) => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
91
|
var _a;
|
|
92
|
-
if (!user && !
|
|
92
|
+
if (!user && !userWithMissingInfo)
|
|
93
93
|
throw new DynamicError(USER_NOT_LOGGED_IN);
|
|
94
94
|
// VerificationUUID is saved in the context in case the view changes
|
|
95
95
|
// after a profile update (changing the view from edit profile to verify email)
|
|
@@ -119,7 +119,7 @@ const useOtpVerificationRequestRaw = () => {
|
|
|
119
119
|
missingFields,
|
|
120
120
|
updateUserProfileResponse: updateSelfResponse,
|
|
121
121
|
};
|
|
122
|
-
}), [contextVerificationUUID, environmentId, user,
|
|
122
|
+
}), [contextVerificationUUID, environmentId, user, userWithMissingInfo]);
|
|
123
123
|
return { verifyOtp };
|
|
124
124
|
};
|
|
125
125
|
/**
|
|
@@ -58,3 +58,4 @@ export { useSwitchWallet } from './useSwitchWallet';
|
|
|
58
58
|
export { useSyncEmbeddedWalletFlow } from './useSyncEmbeddedWalletFlow';
|
|
59
59
|
export { useSyncOnboardingFlow } from './useSyncOnboardingFlow';
|
|
60
60
|
export { useSelectWalletOption } from './useSelectWalletOption';
|
|
61
|
+
export { useResetCookieLocalStorage } from './useResetCookieLocalStorage';
|
|
@@ -98,8 +98,8 @@ const useMfa = ({ onMfaCompleteOnce, } = {}) => {
|
|
|
98
98
|
}, [onMfaCompleteOnce]);
|
|
99
99
|
const { completeAuth } = useUserAuth.useUserAuth({});
|
|
100
100
|
const { setDeviceSettings } = MfaSettingsContext.useMfaSettingsContext();
|
|
101
|
-
const { user,
|
|
102
|
-
const verifiedUser = user ||
|
|
101
|
+
const { user, userWithMissingInfo, environmentId } = useInternalDynamicContext.useInternalDynamicContext();
|
|
102
|
+
const verifiedUser = user || userWithMissingInfo;
|
|
103
103
|
const getUserDevices = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
104
104
|
if (!verifiedUser) {
|
|
105
105
|
throw new Error(errors.USER_NOT_LOGGED_IN);
|
|
@@ -94,8 +94,8 @@ const useMfa = ({ onMfaCompleteOnce, } = {}) => {
|
|
|
94
94
|
}, [onMfaCompleteOnce]);
|
|
95
95
|
const { completeAuth } = useUserAuth({});
|
|
96
96
|
const { setDeviceSettings } = useMfaSettingsContext();
|
|
97
|
-
const { user,
|
|
98
|
-
const verifiedUser = user ||
|
|
97
|
+
const { user, userWithMissingInfo, environmentId } = useInternalDynamicContext();
|
|
98
|
+
const verifiedUser = user || userWithMissingInfo;
|
|
99
99
|
const getUserDevices = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
100
|
if (!verifiedUser) {
|
|
101
101
|
throw new Error(USER_NOT_LOGGED_IN);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useResetCookieLocalStorage } from './useResetCookieLocalStorage';
|