@dynamic-labs/sdk-react-core 4.48.2 → 4.50.1
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 +27 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +12 -12
- package/src/index.cjs +6 -4
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +10 -0
- package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +10 -0
- package/src/lib/context/OnrampContext/OnrampContext.cjs +4 -2
- package/src/lib/context/OnrampContext/OnrampContext.d.ts +1 -0
- package/src/lib/context/OnrampContext/OnrampContext.js +4 -2
- package/src/lib/context/OnrampContext/types.d.ts +1 -0
- package/src/lib/context/OnrampContext/utils/getOnrampProviders.cjs +2 -1
- package/src/lib/context/OnrampContext/utils/getOnrampProviders.d.ts +1 -1
- package/src/lib/context/OnrampContext/utils/getOnrampProviders.js +2 -1
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +38 -6
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.d.ts +2 -2
- package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +39 -8
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +108 -16
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +108 -16
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/data/api/onramp/onramp.cjs +2 -1
- package/src/lib/data/api/onramp/onramp.d.ts +2 -1
- package/src/lib/data/api/onramp/onramp.js +2 -1
- package/src/lib/events/dynamicEvents.cjs +2 -0
- package/src/lib/events/dynamicEvents.d.ts +1 -1
- package/src/lib/events/dynamicEvents.js +2 -0
- package/src/lib/shared/assets/backup-waas.cjs +4 -4
- package/src/lib/shared/assets/backup-waas.js +4 -4
- package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +4 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/authViewLayoutChecks.cjs +13 -0
- package/src/lib/utils/constants/authViewLayoutChecks.js +13 -0
- package/src/lib/utils/functions/generateMessages/index.cjs +11 -2
- package/src/lib/utils/functions/generateMessages/index.js +11 -2
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +27 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +27 -1
- package/src/lib/utils/functions/index.d.ts +0 -1
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +1 -1
- package/src/lib/utils/hooks/index.d.ts +2 -0
- package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.cjs +5 -1
- package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.js +5 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +35 -5
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +35 -5
- package/src/lib/utils/hooks/useFunding/useFunding.d.ts +1 -0
- package/src/lib/utils/hooks/useOnramp/useOnramp.cjs +14 -29
- package/src/lib/utils/hooks/useOnramp/useOnramp.d.ts +14 -18
- package/src/lib/utils/hooks/useOnramp/useOnramp.js +14 -29
- package/src/lib/utils/hooks/usePhantomRedirectEvents/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.cjs +65 -0
- package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.d.ts +36 -0
- package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.js +61 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +17 -14
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +17 -14
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.cjs +106 -1
- package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.js +106 -1
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +1 -1
- package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +1 -1
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +1 -1
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +1 -1
- package/src/lib/utils/hooks/useWalletBackup/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +339 -0
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.d.ts +49 -0
- package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +332 -0
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +2 -2
- package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +2 -2
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +1 -0
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +13 -0
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +14 -1
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +9 -6
- package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +9 -6
- package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +13 -0
- package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +14 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +15 -3
- package/src/lib/views/viewToComponentMap.d.ts +6 -0
- package/src/lib/views/viewToComponentMap.js +15 -3
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +97 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +97 -3
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +16 -14
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +16 -14
- package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js +3 -1
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.cjs +37 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.js +33 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.cjs +49 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.js +45 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.cjs +53 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.js +49 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.cjs +9 -18
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.js +10 -19
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.cjs +52 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.js +48 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs +131 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.d.ts +5 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js +127 -0
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +45 -104
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +47 -106
- package/src/lib/widgets/DynamicWidget/views/WaasBackupView/index.d.ts +6 -1
- package/src/lib/utils/functions/downloadFile/downloadFile.cjs +0 -15
- package/src/lib/utils/functions/downloadFile/downloadFile.d.ts +0 -1
- package/src/lib/utils/functions/downloadFile/downloadFile.js +0 -11
- package/src/lib/utils/functions/downloadFile/index.d.ts +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var PhantomRedirectContext = require('../../../context/PhantomRedirectContext/PhantomRedirectContext.cjs');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Hook to listen for Phantom redirect events.
|
|
11
|
+
*
|
|
12
|
+
* When using Phantom wallet on mobile, signing operations open the Phantom app
|
|
13
|
+
* via deep link. After the user approves, Phantom redirects back to your app.
|
|
14
|
+
* On mobile web browsers, this redirect opens a new tab, which means the
|
|
15
|
+
* original page context (including any Promise awaiting the signature) is lost.
|
|
16
|
+
*
|
|
17
|
+
* This hook allows you to subscribe to events that fire when Phantom redirects
|
|
18
|
+
* back, so you can handle the signature result even after context is lost.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* usePhantomRedirectEvents({
|
|
23
|
+
* onSignMessage: ({ signature, errorCode, errorMessage }) => {
|
|
24
|
+
* if (errorCode) {
|
|
25
|
+
* console.error('Sign failed:', errorMessage);
|
|
26
|
+
* return;
|
|
27
|
+
* }
|
|
28
|
+
* console.log('Signature:', signature);
|
|
29
|
+
* },
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
const usePhantomRedirectEvents = ({ onSignMessage, onSignAndSendTransaction, onSignTransaction, onSignAllTransactions, }) => {
|
|
34
|
+
const { phantomRedirectConnector } = PhantomRedirectContext.usePhantomRedirectContext();
|
|
35
|
+
// Store callbacks in refs to avoid re-subscribing when they change
|
|
36
|
+
const onSignMessageRef = React.useRef(onSignMessage);
|
|
37
|
+
const onSignAndSendTransactionRef = React.useRef(onSignAndSendTransaction);
|
|
38
|
+
const onSignTransactionRef = React.useRef(onSignTransaction);
|
|
39
|
+
const onSignAllTransactionsRef = React.useRef(onSignAllTransactions);
|
|
40
|
+
// Keep refs up to date
|
|
41
|
+
onSignMessageRef.current = onSignMessage;
|
|
42
|
+
onSignAndSendTransactionRef.current = onSignAndSendTransaction;
|
|
43
|
+
onSignTransactionRef.current = onSignTransaction;
|
|
44
|
+
onSignAllTransactionsRef.current = onSignAllTransactions;
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (!phantomRedirectConnector)
|
|
47
|
+
return;
|
|
48
|
+
const handleSignMessage = (data) => { var _a; return (_a = onSignMessageRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignMessageRef, data); };
|
|
49
|
+
const handleSignAndSendTransaction = (data) => { var _a; return (_a = onSignAndSendTransactionRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignAndSendTransactionRef, data); };
|
|
50
|
+
const handleSignTransaction = (data) => { var _a; return (_a = onSignTransactionRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignTransactionRef, data); };
|
|
51
|
+
const handleSignAllTransactions = (data) => { var _a; return (_a = onSignAllTransactionsRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignAllTransactionsRef, data); };
|
|
52
|
+
phantomRedirectConnector.on('signMessage', handleSignMessage);
|
|
53
|
+
phantomRedirectConnector.on('signAndSendTransaction', handleSignAndSendTransaction);
|
|
54
|
+
phantomRedirectConnector.on('signTransaction', handleSignTransaction);
|
|
55
|
+
phantomRedirectConnector.on('signAllTransactions', handleSignAllTransactions);
|
|
56
|
+
return () => {
|
|
57
|
+
phantomRedirectConnector.off('signMessage', handleSignMessage);
|
|
58
|
+
phantomRedirectConnector.off('signAndSendTransaction', handleSignAndSendTransaction);
|
|
59
|
+
phantomRedirectConnector.off('signTransaction', handleSignTransaction);
|
|
60
|
+
phantomRedirectConnector.off('signAllTransactions', handleSignAllTransactions);
|
|
61
|
+
};
|
|
62
|
+
}, [phantomRedirectConnector]);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.usePhantomRedirectEvents = usePhantomRedirectEvents;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SignAllTransactionsListener, SignAndSendTransactionListener, SignMessageListener, SignTransactionListener } from '@dynamic-labs/wallet-connector-core';
|
|
2
|
+
export type UsePhantomRedirectEventsProps = {
|
|
3
|
+
/** Called when a signMessage operation completes after Phantom redirect. */
|
|
4
|
+
onSignMessage?: SignMessageListener;
|
|
5
|
+
/** Called when a signAndSendTransaction operation completes after Phantom redirect. */
|
|
6
|
+
onSignAndSendTransaction?: SignAndSendTransactionListener;
|
|
7
|
+
/** Called when a signTransaction operation completes after Phantom redirect. */
|
|
8
|
+
onSignTransaction?: SignTransactionListener;
|
|
9
|
+
/** Called when a signAllTransactions operation completes after Phantom redirect. */
|
|
10
|
+
onSignAllTransactions?: SignAllTransactionsListener;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Hook to listen for Phantom redirect events.
|
|
14
|
+
*
|
|
15
|
+
* When using Phantom wallet on mobile, signing operations open the Phantom app
|
|
16
|
+
* via deep link. After the user approves, Phantom redirects back to your app.
|
|
17
|
+
* On mobile web browsers, this redirect opens a new tab, which means the
|
|
18
|
+
* original page context (including any Promise awaiting the signature) is lost.
|
|
19
|
+
*
|
|
20
|
+
* This hook allows you to subscribe to events that fire when Phantom redirects
|
|
21
|
+
* back, so you can handle the signature result even after context is lost.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* usePhantomRedirectEvents({
|
|
26
|
+
* onSignMessage: ({ signature, errorCode, errorMessage }) => {
|
|
27
|
+
* if (errorCode) {
|
|
28
|
+
* console.error('Sign failed:', errorMessage);
|
|
29
|
+
* return;
|
|
30
|
+
* }
|
|
31
|
+
* console.log('Signature:', signature);
|
|
32
|
+
* },
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const usePhantomRedirectEvents: ({ onSignMessage, onSignAndSendTransaction, onSignTransaction, onSignAllTransactions, }: UsePhantomRedirectEventsProps) => void;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { usePhantomRedirectContext } from '../../../context/PhantomRedirectContext/PhantomRedirectContext.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook to listen for Phantom redirect events.
|
|
7
|
+
*
|
|
8
|
+
* When using Phantom wallet on mobile, signing operations open the Phantom app
|
|
9
|
+
* via deep link. After the user approves, Phantom redirects back to your app.
|
|
10
|
+
* On mobile web browsers, this redirect opens a new tab, which means the
|
|
11
|
+
* original page context (including any Promise awaiting the signature) is lost.
|
|
12
|
+
*
|
|
13
|
+
* This hook allows you to subscribe to events that fire when Phantom redirects
|
|
14
|
+
* back, so you can handle the signature result even after context is lost.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* usePhantomRedirectEvents({
|
|
19
|
+
* onSignMessage: ({ signature, errorCode, errorMessage }) => {
|
|
20
|
+
* if (errorCode) {
|
|
21
|
+
* console.error('Sign failed:', errorMessage);
|
|
22
|
+
* return;
|
|
23
|
+
* }
|
|
24
|
+
* console.log('Signature:', signature);
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const usePhantomRedirectEvents = ({ onSignMessage, onSignAndSendTransaction, onSignTransaction, onSignAllTransactions, }) => {
|
|
30
|
+
const { phantomRedirectConnector } = usePhantomRedirectContext();
|
|
31
|
+
// Store callbacks in refs to avoid re-subscribing when they change
|
|
32
|
+
const onSignMessageRef = useRef(onSignMessage);
|
|
33
|
+
const onSignAndSendTransactionRef = useRef(onSignAndSendTransaction);
|
|
34
|
+
const onSignTransactionRef = useRef(onSignTransaction);
|
|
35
|
+
const onSignAllTransactionsRef = useRef(onSignAllTransactions);
|
|
36
|
+
// Keep refs up to date
|
|
37
|
+
onSignMessageRef.current = onSignMessage;
|
|
38
|
+
onSignAndSendTransactionRef.current = onSignAndSendTransaction;
|
|
39
|
+
onSignTransactionRef.current = onSignTransaction;
|
|
40
|
+
onSignAllTransactionsRef.current = onSignAllTransactions;
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (!phantomRedirectConnector)
|
|
43
|
+
return;
|
|
44
|
+
const handleSignMessage = (data) => { var _a; return (_a = onSignMessageRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignMessageRef, data); };
|
|
45
|
+
const handleSignAndSendTransaction = (data) => { var _a; return (_a = onSignAndSendTransactionRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignAndSendTransactionRef, data); };
|
|
46
|
+
const handleSignTransaction = (data) => { var _a; return (_a = onSignTransactionRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignTransactionRef, data); };
|
|
47
|
+
const handleSignAllTransactions = (data) => { var _a; return (_a = onSignAllTransactionsRef.current) === null || _a === void 0 ? void 0 : _a.call(onSignAllTransactionsRef, data); };
|
|
48
|
+
phantomRedirectConnector.on('signMessage', handleSignMessage);
|
|
49
|
+
phantomRedirectConnector.on('signAndSendTransaction', handleSignAndSendTransaction);
|
|
50
|
+
phantomRedirectConnector.on('signTransaction', handleSignTransaction);
|
|
51
|
+
phantomRedirectConnector.on('signAllTransactions', handleSignAllTransactions);
|
|
52
|
+
return () => {
|
|
53
|
+
phantomRedirectConnector.off('signMessage', handleSignMessage);
|
|
54
|
+
phantomRedirectConnector.off('signAndSendTransaction', handleSignAndSendTransaction);
|
|
55
|
+
phantomRedirectConnector.off('signTransaction', handleSignTransaction);
|
|
56
|
+
phantomRedirectConnector.off('signAllTransactions', handleSignAllTransactions);
|
|
57
|
+
};
|
|
58
|
+
}, [phantomRedirectConnector]);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { usePhantomRedirectEvents };
|
|
@@ -4,35 +4,36 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
|
+
require('@dynamic-labs-sdk/client/core');
|
|
8
|
+
require('@dynamic-labs/sdk-api-core');
|
|
9
|
+
require('../../../client/client.cjs');
|
|
7
10
|
require('react');
|
|
8
|
-
require('
|
|
9
|
-
require('
|
|
10
|
-
require('@dynamic-labs/utils');
|
|
11
|
-
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
12
|
-
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
11
|
+
require('@dynamic-labs-sdk/client');
|
|
12
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
13
13
|
require('@dynamic-labs/iconic');
|
|
14
14
|
require('react/jsx-runtime');
|
|
15
15
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
16
16
|
require('../../../shared/logger.cjs');
|
|
17
17
|
require('@dynamic-labs/wallet-book');
|
|
18
|
+
require('@dynamic-labs/utils');
|
|
18
19
|
require('../../constants/colors.cjs');
|
|
19
20
|
require('../../constants/values.cjs');
|
|
20
|
-
require('@dynamic-labs/sdk-api-core');
|
|
21
21
|
require('../../../shared/consts/index.cjs');
|
|
22
|
-
require('
|
|
23
|
-
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
24
|
-
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
22
|
+
require('../../../../../_virtual/_tslib.cjs');
|
|
25
23
|
require('@dynamic-labs/multi-wallet');
|
|
26
24
|
require('react-international-phone');
|
|
27
25
|
require('../../../store/state/nonce/nonce.cjs');
|
|
28
|
-
require('@dynamic-labs-sdk/client/core');
|
|
29
|
-
require('../../../client/client.cjs');
|
|
30
|
-
require('@dynamic-labs-sdk/client');
|
|
31
|
-
require('../../../config/ApiEndpoint.cjs');
|
|
32
26
|
require('@dynamic-labs/locale');
|
|
33
27
|
var dynamicContextProps = require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
34
28
|
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
35
29
|
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
30
|
+
require('../../../events/dynamicEvents.cjs');
|
|
31
|
+
var isCookieEnabled = require('../../../client/extension/functions/isCookieEnabled/isCookieEnabled.cjs');
|
|
32
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
33
|
+
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
34
|
+
require('../../../store/state/authMode/authMode.cjs');
|
|
35
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
36
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
36
37
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
37
38
|
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
38
39
|
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -77,6 +78,7 @@ require('qrcode');
|
|
|
77
78
|
require('formik');
|
|
78
79
|
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
80
|
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
81
|
+
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
80
82
|
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
81
83
|
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
82
84
|
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
@@ -89,7 +91,6 @@ require('../../../context/FooterAnimationContext/index.cjs');
|
|
|
89
91
|
require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
90
92
|
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
91
93
|
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
92
|
-
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
93
94
|
require('../../../store/state/sendBalances.cjs');
|
|
94
95
|
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
95
96
|
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
@@ -111,6 +112,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
111
112
|
const { registerEmbeddedWalletSessionKey, removeSessionKey } = useEmbeddedWalletSessionKeys.useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
|
|
112
113
|
const { getSignedSessionId } = useClientSessionKeys.useClientSessionKeys();
|
|
113
114
|
const getMfaToken = useGetMfaToken.useGetMfaToken();
|
|
115
|
+
const isCookieAuthEnabled = projectSettings && isCookieEnabled.isCookieEnabled();
|
|
114
116
|
if (!(walletOptions === null || walletOptions === void 0 ? void 0 : walletOptions.length))
|
|
115
117
|
return;
|
|
116
118
|
walletOptions.forEach((walletOption) => {
|
|
@@ -122,6 +124,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
122
124
|
else if (walletConnectorCore.isDynamicWaasConnector(walletOption.walletConnector)) {
|
|
123
125
|
useDynamicWaas.configWaasWalletConnector({
|
|
124
126
|
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : apiUrl.DEFAULT_WAAS_API_URL,
|
|
127
|
+
authMode: isCookieAuthEnabled ? 'cookie' : 'header',
|
|
125
128
|
environmentId,
|
|
126
129
|
getMfaToken,
|
|
127
130
|
getSignedSessionId,
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { isSessionKeyCompatibleWalletConnector, isDynamicWaasConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
|
+
import '@dynamic-labs-sdk/client/core';
|
|
4
|
+
import '@dynamic-labs/sdk-api-core';
|
|
5
|
+
import '../../../client/client.js';
|
|
3
6
|
import 'react';
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '@dynamic-labs/utils';
|
|
7
|
-
import '../../../context/DynamicContext/DynamicContext.js';
|
|
8
|
-
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
7
|
+
import '@dynamic-labs-sdk/client';
|
|
8
|
+
import '../../../config/ApiEndpoint.js';
|
|
9
9
|
import '@dynamic-labs/iconic';
|
|
10
10
|
import 'react/jsx-runtime';
|
|
11
11
|
import '../../../context/ViewContext/ViewContext.js';
|
|
12
12
|
import '../../../shared/logger.js';
|
|
13
13
|
import '@dynamic-labs/wallet-book';
|
|
14
|
+
import '@dynamic-labs/utils';
|
|
14
15
|
import '../../constants/colors.js';
|
|
15
16
|
import '../../constants/values.js';
|
|
16
|
-
import '@dynamic-labs/sdk-api-core';
|
|
17
17
|
import '../../../shared/consts/index.js';
|
|
18
|
-
import '
|
|
19
|
-
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
20
|
-
import '../../../context/ErrorContext/ErrorContext.js';
|
|
18
|
+
import '../../../../../_virtual/_tslib.js';
|
|
21
19
|
import '@dynamic-labs/multi-wallet';
|
|
22
20
|
import 'react-international-phone';
|
|
23
21
|
import '../../../store/state/nonce/nonce.js';
|
|
24
|
-
import '@dynamic-labs-sdk/client/core';
|
|
25
|
-
import '../../../client/client.js';
|
|
26
|
-
import '@dynamic-labs-sdk/client';
|
|
27
|
-
import '../../../config/ApiEndpoint.js';
|
|
28
22
|
import '@dynamic-labs/locale';
|
|
29
23
|
import { useApiBaseUrl } from '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
30
24
|
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
31
25
|
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
26
|
+
import '../../../events/dynamicEvents.js';
|
|
27
|
+
import { isCookieEnabled } from '../../../client/extension/functions/isCookieEnabled/isCookieEnabled.js';
|
|
28
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
29
|
+
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
30
|
+
import '../../../store/state/authMode/authMode.js';
|
|
31
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
32
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
32
33
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
33
34
|
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
34
35
|
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
@@ -73,6 +74,7 @@ import 'qrcode';
|
|
|
73
74
|
import 'formik';
|
|
74
75
|
import '../useSubdomainCheck/useSubdomainCheck.js';
|
|
75
76
|
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
77
|
+
import { configWaasWalletConnector } from '../useDynamicWaas/useDynamicWaas.js';
|
|
76
78
|
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
77
79
|
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
78
80
|
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
@@ -85,7 +87,6 @@ import '../../../context/FooterAnimationContext/index.js';
|
|
|
85
87
|
import '../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
86
88
|
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
87
89
|
import '../../../context/OnrampContext/OnrampContext.js';
|
|
88
|
-
import { configWaasWalletConnector } from '../useDynamicWaas/useDynamicWaas.js';
|
|
89
90
|
import '../../../store/state/sendBalances.js';
|
|
90
91
|
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
91
92
|
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
@@ -107,6 +108,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
107
108
|
const { registerEmbeddedWalletSessionKey, removeSessionKey } = useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
|
|
108
109
|
const { getSignedSessionId } = useClientSessionKeys();
|
|
109
110
|
const getMfaToken = useGetMfaToken();
|
|
111
|
+
const isCookieAuthEnabled = projectSettings && isCookieEnabled();
|
|
110
112
|
if (!(walletOptions === null || walletOptions === void 0 ? void 0 : walletOptions.length))
|
|
111
113
|
return;
|
|
112
114
|
walletOptions.forEach((walletOption) => {
|
|
@@ -118,6 +120,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
118
120
|
else if (isDynamicWaasConnector(walletOption.walletConnector)) {
|
|
119
121
|
configWaasWalletConnector({
|
|
120
122
|
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : DEFAULT_WAAS_API_URL,
|
|
123
|
+
authMode: isCookieAuthEnabled ? 'cookie' : 'header',
|
|
121
124
|
environmentId,
|
|
122
125
|
getMfaToken,
|
|
123
126
|
getSignedSessionId,
|
|
@@ -3,8 +3,105 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var client = require('@dynamic-labs-sdk/client');
|
|
9
|
+
require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
require('../../constants/values.cjs');
|
|
11
|
+
require('@dynamic-labs/utils');
|
|
12
|
+
require('@dynamic-labs/multi-wallet');
|
|
13
|
+
require('react-international-phone');
|
|
14
|
+
require('../../constants/colors.cjs');
|
|
15
|
+
require('@dynamic-labs/iconic');
|
|
16
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
17
|
+
require('react/jsx-runtime');
|
|
18
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
19
|
+
require('../../../shared/logger.cjs');
|
|
20
|
+
require('@dynamic-labs/wallet-book');
|
|
21
|
+
require('../../../shared/consts/index.cjs');
|
|
22
|
+
require('../../../store/state/nonce/nonce.cjs');
|
|
23
|
+
require('@dynamic-labs-sdk/client/core');
|
|
24
|
+
require('../../../client/client.cjs');
|
|
25
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
26
|
+
require('../../../events/dynamicEvents.cjs');
|
|
27
|
+
require('@dynamic-labs/locale');
|
|
28
|
+
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
29
|
+
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
30
|
+
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
31
|
+
var getClientSessionKeys = require('../../functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
32
|
+
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
33
|
+
require('../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
|
|
34
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
35
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
36
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
37
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
38
|
+
require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
39
|
+
require('../../../store/state/authMode/authMode.cjs');
|
|
40
|
+
require('../../../context/VerificationContext/VerificationContext.cjs');
|
|
41
|
+
require('react-dom');
|
|
42
|
+
require('../../functions/compareChains/compareChains.cjs');
|
|
43
|
+
require('../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
44
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
45
|
+
require('../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
|
|
46
|
+
require('bs58');
|
|
47
|
+
require('@dynamic-labs/types');
|
|
48
|
+
require('../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
|
|
49
|
+
require('../../../context/LoadingContext/LoadingContext.cjs');
|
|
50
|
+
require('../../../context/WalletContext/WalletContext.cjs');
|
|
51
|
+
require('../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
|
|
52
|
+
require('yup');
|
|
53
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
54
|
+
require('../../../views/CollectUserDataView/useFields.cjs');
|
|
55
|
+
require('../../../context/FieldsStateContext/FieldsStateContext.cjs');
|
|
56
|
+
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
57
|
+
require('@dynamic-labs/rpc-providers');
|
|
58
|
+
require('../../../store/state/walletOptions/walletOptions.cjs');
|
|
59
|
+
require('react-i18next');
|
|
60
|
+
require('../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
61
|
+
require('../../../components/Alert/Alert.cjs');
|
|
62
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
63
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
64
|
+
require('../../../components/InlineWidget/InlineWidget.cjs');
|
|
65
|
+
require('../../../components/Input/Input.cjs');
|
|
66
|
+
require('../../../components/IsBrowser/IsBrowser.cjs');
|
|
67
|
+
require('../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
68
|
+
require('../../../components/OverlayCard/OverlayCard.cjs');
|
|
69
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
70
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
71
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
72
|
+
require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
|
|
73
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
74
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
75
|
+
require('react-focus-lock');
|
|
76
|
+
require('qrcode');
|
|
77
|
+
require('formik');
|
|
78
|
+
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
79
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
80
|
+
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
81
|
+
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
82
|
+
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
83
|
+
require('@hcaptcha/react-hcaptcha');
|
|
84
|
+
require('../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
|
|
85
|
+
require('../../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs');
|
|
86
|
+
require('../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
|
|
87
|
+
require('../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
|
|
88
|
+
require('../../../context/FooterAnimationContext/index.cjs');
|
|
89
|
+
require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
90
|
+
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
91
|
+
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
92
|
+
require('../../../store/state/sendBalances.cjs');
|
|
93
|
+
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
94
|
+
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
95
|
+
require('../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
96
|
+
require('../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
97
|
+
require('../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.cjs');
|
|
98
|
+
require('../../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs');
|
|
99
|
+
require('../../../../index.cjs');
|
|
100
|
+
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
101
|
+
require('../../../store/state/tokenBalances.cjs');
|
|
102
|
+
require('../../../store/state/multichainBalances.cjs');
|
|
103
|
+
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
104
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
|
|
8
105
|
|
|
9
106
|
/**
|
|
10
107
|
* Sign in with passkey
|
|
@@ -25,6 +122,14 @@ var client = require('@dynamic-labs-sdk/client');
|
|
|
25
122
|
* );
|
|
26
123
|
* }
|
|
27
124
|
*/
|
|
28
|
-
const useSignInWithPasskey = ({ relatedOriginRpId, } = {}) =>
|
|
125
|
+
const useSignInWithPasskey = ({ relatedOriginRpId, } = {}) => {
|
|
126
|
+
const { setCallback } = useInternalDynamicContext.useInternalDynamicContext();
|
|
127
|
+
return React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
128
|
+
yield getClientSessionKeys.generateClientSessionKeys();
|
|
129
|
+
const response = yield client.signInWithPasskey({ relatedOriginRpId });
|
|
130
|
+
setCallback('authSuccess');
|
|
131
|
+
return response;
|
|
132
|
+
}), [relatedOriginRpId, setCallback]);
|
|
133
|
+
};
|
|
29
134
|
|
|
30
135
|
exports.useSignInWithPasskey = useSignInWithPasskey;
|
|
@@ -1,6 +1,103 @@
|
|
|
1
1
|
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
3
|
import { useCallback } from 'react';
|
|
3
4
|
import { signInWithPasskey } from '@dynamic-labs-sdk/client';
|
|
5
|
+
import '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import '../../constants/values.js';
|
|
7
|
+
import '@dynamic-labs/utils';
|
|
8
|
+
import '@dynamic-labs/multi-wallet';
|
|
9
|
+
import 'react-international-phone';
|
|
10
|
+
import '../../constants/colors.js';
|
|
11
|
+
import '@dynamic-labs/iconic';
|
|
12
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
13
|
+
import 'react/jsx-runtime';
|
|
14
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
15
|
+
import '../../../shared/logger.js';
|
|
16
|
+
import '@dynamic-labs/wallet-book';
|
|
17
|
+
import '../../../shared/consts/index.js';
|
|
18
|
+
import '../../../store/state/nonce/nonce.js';
|
|
19
|
+
import '@dynamic-labs-sdk/client/core';
|
|
20
|
+
import '../../../client/client.js';
|
|
21
|
+
import '../../../config/ApiEndpoint.js';
|
|
22
|
+
import '../../../events/dynamicEvents.js';
|
|
23
|
+
import '@dynamic-labs/locale';
|
|
24
|
+
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
25
|
+
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
26
|
+
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
27
|
+
import { generateClientSessionKeys } from '../../functions/clientSessionKeys/getClientSessionKeys.js';
|
|
28
|
+
import '../../../context/DynamicContext/DynamicContext.js';
|
|
29
|
+
import '../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
|
|
30
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
31
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
32
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
33
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
34
|
+
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
35
|
+
import '../../../store/state/authMode/authMode.js';
|
|
36
|
+
import '../../../context/VerificationContext/VerificationContext.js';
|
|
37
|
+
import 'react-dom';
|
|
38
|
+
import '../../functions/compareChains/compareChains.js';
|
|
39
|
+
import '../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
40
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
41
|
+
import '../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
42
|
+
import 'bs58';
|
|
43
|
+
import '@dynamic-labs/types';
|
|
44
|
+
import '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
45
|
+
import '../../../context/LoadingContext/LoadingContext.js';
|
|
46
|
+
import '../../../context/WalletContext/WalletContext.js';
|
|
47
|
+
import '../useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
48
|
+
import 'yup';
|
|
49
|
+
import '../../../context/MockContext/MockContext.js';
|
|
50
|
+
import '../../../views/CollectUserDataView/useFields.js';
|
|
51
|
+
import '../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
52
|
+
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
53
|
+
import '@dynamic-labs/rpc-providers';
|
|
54
|
+
import '../../../store/state/walletOptions/walletOptions.js';
|
|
55
|
+
import 'react-i18next';
|
|
56
|
+
import '../../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
57
|
+
import '../../../components/Alert/Alert.js';
|
|
58
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
59
|
+
import '../../../components/IconButton/IconButton.js';
|
|
60
|
+
import '../../../components/InlineWidget/InlineWidget.js';
|
|
61
|
+
import '../../../components/Input/Input.js';
|
|
62
|
+
import '../../../components/IsBrowser/IsBrowser.js';
|
|
63
|
+
import '../../../components/MenuList/Dropdown/Dropdown.js';
|
|
64
|
+
import '../../../components/OverlayCard/OverlayCard.js';
|
|
65
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
66
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
67
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
68
|
+
import '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
69
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
70
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
71
|
+
import 'react-focus-lock';
|
|
72
|
+
import 'qrcode';
|
|
73
|
+
import 'formik';
|
|
74
|
+
import '../useSubdomainCheck/useSubdomainCheck.js';
|
|
75
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
76
|
+
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
77
|
+
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
78
|
+
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
79
|
+
import '@hcaptcha/react-hcaptcha';
|
|
80
|
+
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
81
|
+
import '../../../widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js';
|
|
82
|
+
import '../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
|
|
83
|
+
import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
84
|
+
import '../../../context/FooterAnimationContext/index.js';
|
|
85
|
+
import '../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
86
|
+
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
87
|
+
import '../../../context/OnrampContext/OnrampContext.js';
|
|
88
|
+
import '../../../store/state/sendBalances.js';
|
|
89
|
+
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
90
|
+
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
91
|
+
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
92
|
+
import '../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
93
|
+
import '../../../widgets/DynamicWidget/components/PasskeyCard/PasskeyCard.js';
|
|
94
|
+
import '../../../widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js';
|
|
95
|
+
import '../../../../index.js';
|
|
96
|
+
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
97
|
+
import '../../../store/state/tokenBalances.js';
|
|
98
|
+
import '../../../store/state/multichainBalances.js';
|
|
99
|
+
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
100
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
|
|
4
101
|
|
|
5
102
|
/**
|
|
6
103
|
* Sign in with passkey
|
|
@@ -21,6 +118,14 @@ import { signInWithPasskey } from '@dynamic-labs-sdk/client';
|
|
|
21
118
|
* );
|
|
22
119
|
* }
|
|
23
120
|
*/
|
|
24
|
-
const useSignInWithPasskey = ({ relatedOriginRpId, } = {}) =>
|
|
121
|
+
const useSignInWithPasskey = ({ relatedOriginRpId, } = {}) => {
|
|
122
|
+
const { setCallback } = useInternalDynamicContext();
|
|
123
|
+
return useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
124
|
+
yield generateClientSessionKeys();
|
|
125
|
+
const response = yield signInWithPasskey({ relatedOriginRpId });
|
|
126
|
+
setCallback('authSuccess');
|
|
127
|
+
return response;
|
|
128
|
+
}), [relatedOriginRpId, setCallback]);
|
|
129
|
+
};
|
|
25
130
|
|
|
26
131
|
export { useSignInWithPasskey };
|
|
@@ -76,6 +76,7 @@ require('qrcode');
|
|
|
76
76
|
require('formik');
|
|
77
77
|
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
78
78
|
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
79
|
+
require('../../functions/compareChains/compareChains.cjs');
|
|
79
80
|
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
80
81
|
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
81
82
|
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
@@ -88,7 +89,6 @@ require('../../../context/FooterAnimationContext/index.cjs');
|
|
|
88
89
|
require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
|
|
89
90
|
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
90
91
|
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
91
|
-
require('../../functions/compareChains/compareChains.cjs');
|
|
92
92
|
require('../../../store/state/sendBalances.cjs');
|
|
93
93
|
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
94
94
|
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|
|
@@ -72,6 +72,7 @@ import 'qrcode';
|
|
|
72
72
|
import 'formik';
|
|
73
73
|
import '../useSubdomainCheck/useSubdomainCheck.js';
|
|
74
74
|
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
75
|
+
import '../../functions/compareChains/compareChains.js';
|
|
75
76
|
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
76
77
|
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
77
78
|
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
@@ -84,7 +85,6 @@ import '../../../context/FooterAnimationContext/index.js';
|
|
|
84
85
|
import '../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
|
|
85
86
|
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
86
87
|
import '../../../context/OnrampContext/OnrampContext.js';
|
|
87
|
-
import '../../functions/compareChains/compareChains.js';
|
|
88
88
|
import '../../../store/state/sendBalances.js';
|
|
89
89
|
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
90
90
|
import '../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
@@ -80,6 +80,7 @@ require('qrcode');
|
|
|
80
80
|
require('formik');
|
|
81
81
|
require('../useSubdomainCheck/useSubdomainCheck.cjs');
|
|
82
82
|
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
83
|
+
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
83
84
|
require('../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
|
|
84
85
|
require('../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
|
|
85
86
|
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
@@ -93,7 +94,6 @@ require('../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cj
|
|
|
93
94
|
require('../../../context/PasskeyContext/PasskeyContext.cjs');
|
|
94
95
|
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
95
96
|
var useWalletDelegation = require('../useWalletDelegation/useWalletDelegation.cjs');
|
|
96
|
-
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
97
97
|
require('../../../store/state/sendBalances.cjs');
|
|
98
98
|
require('../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
|
|
99
99
|
require('../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
|