@dynamic-labs/sdk-react-core 4.20.4 → 4.20.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/functions.d.ts +1 -0
- package/src/index.cjs +5 -2
- package/src/index.d.ts +3 -1
- package/src/index.js +3 -2
- package/src/lib/Main.cjs +2 -2
- package/src/lib/Main.js +3 -3
- package/src/lib/components/ModalCard/ModalCard.cjs +3 -1
- package/src/lib/components/ModalCard/ModalCard.d.ts +2 -0
- package/src/lib/components/ModalCard/ModalCard.js +3 -1
- package/src/lib/components/UserWalletsList/UserWalletsList.cjs +2 -2
- package/src/lib/components/UserWalletsList/UserWalletsList.js +3 -3
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -0
- package/src/lib/context/UserWalletsContext/UserWalletsContext.cjs +2 -2
- package/src/lib/context/UserWalletsContext/UserWalletsContext.d.ts +1 -1
- package/src/lib/context/UserWalletsContext/UserWalletsContext.js +2 -2
- package/src/lib/data/api/api.cjs +5 -0
- package/src/lib/data/api/api.js +5 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -0
- package/src/lib/locale/en/translation.cjs +15 -0
- package/src/lib/locale/en/translation.d.ts +15 -0
- package/src/lib/locale/en/translation.js +15 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/sessionStorage.cjs +12 -0
- package/src/lib/utils/constants/sessionStorage.d.ts +2 -0
- package/src/lib/utils/constants/sessionStorage.js +7 -0
- package/src/lib/utils/functions/clientSessionKeys/constants.cjs +8 -0
- package/src/lib/utils/functions/clientSessionKeys/constants.d.ts +1 -0
- package/src/lib/utils/functions/clientSessionKeys/constants.js +4 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.cjs +67 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.d.ts +17 -0
- package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +58 -0
- package/src/lib/utils/functions/clientSessionKeys/index.d.ts +1 -0
- package/src/lib/utils/functions/clientSessionKeys/types.d.ts +5 -0
- package/src/lib/utils/functions/index.d.ts +2 -0
- package/src/lib/utils/functions/keyService/index.d.ts +1 -0
- package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.cjs → functions/keyService/keyService.cjs} +13 -1
- package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.d.ts → functions/keyService/keyService.d.ts} +1 -0
- package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.js → functions/keyService/keyService.js} +13 -2
- package/src/lib/utils/functions/usingV3Wallets/index.d.ts +1 -0
- package/src/lib/utils/hooks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useClientSessionKeys/index.d.ts +1 -0
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +63 -0
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +5 -0
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +59 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -0
- package/src/lib/utils/hooks/useDynamicWaas/constants.cjs +2 -0
- package/src/lib/utils/hooks/useDynamicWaas/constants.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicWaas/constants.js +2 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +51 -36
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +1 -1
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +52 -37
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +6 -17
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +1 -12
- package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.js +2 -2
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -1
- package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +2 -2
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -1
- package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +3 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +3 -1
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -1
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +2 -2
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +0 -5
- package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +0 -5
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +4 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +4 -1
- package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +1 -1
- package/src/lib/utils/hooks/useWalletList/useWalletList.js +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +13 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.cjs +134 -0
- package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.d.ts +18 -0
- package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.js +130 -0
- package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.20.5](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.4...v4.20.5) (2025-06-16)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add mpc methods to RN ([#8952](https://github.com/dynamic-labs/dynamic-auth/issues/8952)) ([67383fc](https://github.com/dynamic-labs/dynamic-auth/commit/67383fcd92bc88875d65b520bd1951822a0d7d43))
|
|
8
|
+
* manually create v3 wallets on RN ([#8947](https://github.com/dynamic-labs/dynamic-auth/issues/8947)) ([d534b44](https://github.com/dynamic-labs/dynamic-auth/commit/d534b44bec28302791f789bd762ae5940ef00f58))
|
|
9
|
+
* update Bitget wallet logo with new SVG design ([#8961](https://github.com/dynamic-labs/dynamic-auth/issues/8961)) ([c47aaa6](https://github.com/dynamic-labs/dynamic-auth/commit/c47aaa6e3ee388831ca62f7e8b913cd15e57060f))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* clean user op cache on network switch ([#8966](https://github.com/dynamic-labs/dynamic-auth/issues/8966)) ([d1783d3](https://github.com/dynamic-labs/dynamic-auth/commit/d1783d3bd627e7c31dd3433385218767e69a4fbc))
|
|
15
|
+
|
|
2
16
|
### [4.20.4](https://github.com/dynamic-labs/dynamic-auth/compare/v4.20.3...v4.20.4) (2025-06-13)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.20.
|
|
6
|
+
var version = "4.20.5";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.688",
|
|
9
9
|
"@dynamic-labs-sdk/client": "0.0.1-alpha.5",
|
|
10
10
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
11
11
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.20.
|
|
2
|
+
var version = "4.20.5";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.688",
|
|
5
5
|
"@dynamic-labs-sdk/client": "0.0.1-alpha.5",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.5",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.688",
|
|
6
6
|
"@dynamic-labs-sdk/client": "0.0.1-alpha.5",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
8
8
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"react-international-phone": "4.2.5",
|
|
17
17
|
"bs58": "5.0.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.20.
|
|
19
|
-
"@dynamic-labs/iconic": "4.20.
|
|
20
|
-
"@dynamic-labs/logger": "4.20.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "4.20.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "4.20.
|
|
23
|
-
"@dynamic-labs/store": "4.20.
|
|
24
|
-
"@dynamic-labs/types": "4.20.
|
|
25
|
-
"@dynamic-labs/utils": "4.20.
|
|
26
|
-
"@dynamic-labs/wallet-book": "4.20.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "4.20.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.20.5",
|
|
19
|
+
"@dynamic-labs/iconic": "4.20.5",
|
|
20
|
+
"@dynamic-labs/logger": "4.20.5",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "4.20.5",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "4.20.5",
|
|
23
|
+
"@dynamic-labs/store": "4.20.5",
|
|
24
|
+
"@dynamic-labs/types": "4.20.5",
|
|
25
|
+
"@dynamic-labs/utils": "4.20.5",
|
|
26
|
+
"@dynamic-labs/wallet-book": "4.20.5",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "4.20.5",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/src/functions.d.ts
CHANGED
package/src/index.cjs
CHANGED
|
@@ -64,7 +64,7 @@ require('react-dom');
|
|
|
64
64
|
var dynamicEvents = require('./lib/events/dynamicEvents.cjs');
|
|
65
65
|
var api = require('./lib/data/api/api.cjs');
|
|
66
66
|
require('./lib/store/state/user/user.cjs');
|
|
67
|
-
require('./lib/store/state/projectSettings/projectSettings.cjs');
|
|
67
|
+
var projectSettings = require('./lib/store/state/projectSettings/projectSettings.cjs');
|
|
68
68
|
require('./lib/locale/locale.cjs');
|
|
69
69
|
require('@dynamic-labs/multi-wallet');
|
|
70
70
|
require('react-international-phone');
|
|
@@ -75,6 +75,7 @@ var isAuthenticatedWithAWallet = require('./lib/utils/functions/isAuthenticatedW
|
|
|
75
75
|
require('./lib/store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
76
76
|
require('./lib/store/state/primaryWalletId/primaryWalletId.cjs');
|
|
77
77
|
require('./lib/store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
78
|
+
var usingV3Wallets = require('./lib/utils/functions/usingV3Wallets/usingV3Wallets.cjs');
|
|
78
79
|
require('./lib/utils/functions/compareChains/compareChains.cjs');
|
|
79
80
|
require('./lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
|
|
80
81
|
require('./lib/context/ThemeContext/ThemeContext.cjs');
|
|
@@ -199,7 +200,7 @@ exports.ErrorBoundaryExclude = ErrorBoundaryExclude.ErrorBoundaryExclude;
|
|
|
199
200
|
exports.ErrorBoundaryInclude = ErrorBoundaryInclude.ErrorBoundaryInclude;
|
|
200
201
|
exports.useDynamicContext = useDynamicContext.useDynamicContext;
|
|
201
202
|
exports.useDynamicScopes = useDynamicScopes.useDynamicScopes;
|
|
202
|
-
exports.useUserWallets = UserWalletsContext.
|
|
203
|
+
exports.useUserWallets = UserWalletsContext.useUserWalletsExternal;
|
|
203
204
|
exports.classNames = classNames.classNames;
|
|
204
205
|
exports.ArrowLeftIcon = arrowLeft.ReactComponent;
|
|
205
206
|
exports.ArrowRightIcon = arrowRight.ReactComponent;
|
|
@@ -234,9 +235,11 @@ exports.useWalletConnectorEvent = useWalletConnectorEvent.useWalletConnectorEven
|
|
|
234
235
|
exports.useAuthenticateConnectedUser = useAuthenticateConnectedUser.useAuthenticateConnectedUser;
|
|
235
236
|
exports.dynamicEvents = dynamicEvents.publicDynamicEvents;
|
|
236
237
|
exports.apiClient = api.sdkApi;
|
|
238
|
+
exports.useProjectSettings = projectSettings.useProjectSettings;
|
|
237
239
|
exports.mergeNetworks = mergeNetworks.mergeNetworks;
|
|
238
240
|
exports.overrideNetworkRpcUrl = overrideNetworkRpcUrl.overrideNetworkRpcUrl;
|
|
239
241
|
exports.isAuthenticatedWithAWallet = isAuthenticatedWithAWallet.isAuthenticatedWithAWallet;
|
|
242
|
+
exports.usingV3Wallets = usingV3Wallets.usingV3Wallets;
|
|
240
243
|
exports.useIsLoggedIn = useIsLoggedIn.useIsLoggedIn;
|
|
241
244
|
exports.useOtpVerificationRequest = useOtpVerificationRequest.useOtpVerificationRequest;
|
|
242
245
|
exports.usePasskeyRecovery = usePasskeyRecovery.usePasskeyRecovery;
|
package/src/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { ErrorBoundary, ErrorBoundaryInclude, ErrorBoundaryExclude, } from './li
|
|
|
8
8
|
export type { DynamicContextProps } from './lib/context/DynamicContext';
|
|
9
9
|
export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContext';
|
|
10
10
|
export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes';
|
|
11
|
-
export { useUserWallets } from './lib/context/UserWalletsContext';
|
|
11
|
+
export { useUserWalletsExternal as useUserWallets } from './lib/context/UserWalletsContext';
|
|
12
12
|
export { DynamicConnectButton, ShadowDOM, IsBrowser } from './lib/components';
|
|
13
13
|
export { DynamicBridgeWidget, DynamicEmbeddedAuthFlow, DynamicEmbeddedUserProfile, DynamicEmbeddedWidget, DynamicMultiWalletPromptsWidget, DynamicNav, DynamicUserProfile, DynamicWidget,
|
|
14
14
|
/** @deprecated use OnrampWidget instead */
|
|
@@ -111,6 +111,7 @@ export {
|
|
|
111
111
|
classNames, } from './lib/utils/functions/classNames';
|
|
112
112
|
export { getNetwork } from './lib/utils/functions/getNetwork';
|
|
113
113
|
export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallets, RemoveWallets, SortWallets, UniswapFilter, } from './lib/utils/functions/walletFilters';
|
|
114
|
+
export { useProjectSettings } from './lib/store/state/projectSettings';
|
|
114
115
|
export {
|
|
115
116
|
/** @deprecated */
|
|
116
117
|
DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
|
|
@@ -134,4 +135,5 @@ export { useReinitialize } from './lib/context/ReinitializeContext';
|
|
|
134
135
|
export { useExternalAuth } from './lib/utils/hooks/useExternalAuth';
|
|
135
136
|
export { sdkApi as apiClient } from './lib/data/api/api';
|
|
136
137
|
export { isAuthenticatedWithAWallet } from './lib/utils/functions/isAuthenticatedWithAWallet';
|
|
138
|
+
export { usingV3Wallets } from './lib/utils/functions/usingV3Wallets/usingV3Wallets';
|
|
137
139
|
export { useSyncMfaFlow } from './lib/utils/hooks/useSyncMfaFlow';
|
package/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { ErrorBoundaryInclude } from './lib/context/ErrorBoundary/ErrorBoundaryI
|
|
|
14
14
|
export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContext/useDynamicContext.js';
|
|
15
15
|
import 'react';
|
|
16
16
|
export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes/useDynamicScopes.js';
|
|
17
|
-
export { useUserWallets } from './lib/context/UserWalletsContext/UserWalletsContext.js';
|
|
17
|
+
export { useUserWalletsExternal as useUserWallets } from './lib/context/UserWalletsContext/UserWalletsContext.js';
|
|
18
18
|
import 'react/jsx-runtime';
|
|
19
19
|
export { classNames } from './lib/utils/functions/classNames/classNames.js';
|
|
20
20
|
import './lib/components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
@@ -60,7 +60,7 @@ import 'react-dom';
|
|
|
60
60
|
export { publicDynamicEvents as dynamicEvents } from './lib/events/dynamicEvents.js';
|
|
61
61
|
export { sdkApi as apiClient } from './lib/data/api/api.js';
|
|
62
62
|
import './lib/store/state/user/user.js';
|
|
63
|
-
|
|
63
|
+
export { useProjectSettings } from './lib/store/state/projectSettings/projectSettings.js';
|
|
64
64
|
import './lib/locale/locale.js';
|
|
65
65
|
import '@dynamic-labs/multi-wallet';
|
|
66
66
|
import 'react-international-phone';
|
|
@@ -71,6 +71,7 @@ export { isAuthenticatedWithAWallet } from './lib/utils/functions/isAuthenticate
|
|
|
71
71
|
import './lib/store/state/dynamicContextProps/dynamicContextProps.js';
|
|
72
72
|
import './lib/store/state/primaryWalletId/primaryWalletId.js';
|
|
73
73
|
import './lib/store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
74
|
+
export { usingV3Wallets } from './lib/utils/functions/usingV3Wallets/usingV3Wallets.js';
|
|
74
75
|
import './lib/utils/functions/compareChains/compareChains.js';
|
|
75
76
|
import './lib/views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
|
|
76
77
|
import './lib/context/ThemeContext/ThemeContext.js';
|
package/src/lib/Main.cjs
CHANGED
|
@@ -7,7 +7,6 @@ var _tslib = require('../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var utils = require('@dynamic-labs/utils');
|
|
10
|
-
require('../index.cjs');
|
|
11
10
|
require('./components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
12
11
|
require('react-i18next');
|
|
13
12
|
require('@dynamic-labs/iconic');
|
|
@@ -76,6 +75,7 @@ require('./components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
|
76
75
|
require('./components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
77
76
|
require('./views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
78
77
|
require('./context/PasskeyContext/PasskeyContext.cjs');
|
|
78
|
+
require('../index.cjs');
|
|
79
79
|
require('./components/ShadowDOM/ShadowDOM.cjs');
|
|
80
80
|
require('./utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
|
|
81
81
|
require('./context/WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -114,7 +114,7 @@ const Main = () => {
|
|
|
114
114
|
const { setExistentAccountData } = AccountExistsContext.useAccountExistsContext();
|
|
115
115
|
const { setSocialProvider } = SocialRedirectContext.useSocialRedirectContext();
|
|
116
116
|
usePreventPageScroll.usePreventPageScroll(showAuthFlow);
|
|
117
|
-
const userWallets = UserWalletsContext.
|
|
117
|
+
const { userWallets } = UserWalletsContext.useInternalUserWallets();
|
|
118
118
|
const handleClose = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
119
119
|
var _a;
|
|
120
120
|
if (viewsToDisableCloseOnOverlayClick.includes(view.type))
|
package/src/lib/Main.js
CHANGED
|
@@ -3,7 +3,6 @@ import { __awaiter } from '../../_virtual/_tslib.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useCallback, useEffect } from 'react';
|
|
5
5
|
import { StorageService, isMobile } from '@dynamic-labs/utils';
|
|
6
|
-
import '../index.js';
|
|
7
6
|
import './components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
8
7
|
import 'react-i18next';
|
|
9
8
|
import '@dynamic-labs/iconic';
|
|
@@ -38,7 +37,7 @@ import './store/state/primaryWalletId/primaryWalletId.js';
|
|
|
38
37
|
import './store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
39
38
|
import { useAccessDeniedContext } from './context/AccessDeniedContext/AccessDeniedContext.js';
|
|
40
39
|
import { useAccountExistsContext } from './context/AccountExistsContext/AccountExistsContext.js';
|
|
41
|
-
import {
|
|
40
|
+
import { useInternalUserWallets } from './context/UserWalletsContext/UserWalletsContext.js';
|
|
42
41
|
import { isConnectOnly } from './utils/hooks/authenticationHooks/helpers/isConnectOnly.js';
|
|
43
42
|
import './context/VerificationContext/VerificationContext.js';
|
|
44
43
|
import 'react-dom';
|
|
@@ -72,6 +71,7 @@ import './components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
72
71
|
import './components/Transition/OpacityTransition/OpacityTransition.js';
|
|
73
72
|
import './views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
74
73
|
import './context/PasskeyContext/PasskeyContext.js';
|
|
74
|
+
import '../index.js';
|
|
75
75
|
import './components/ShadowDOM/ShadowDOM.js';
|
|
76
76
|
import './utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
77
77
|
import './context/WalletGroupContext/WalletGroupContext.js';
|
|
@@ -110,7 +110,7 @@ const Main = () => {
|
|
|
110
110
|
const { setExistentAccountData } = useAccountExistsContext();
|
|
111
111
|
const { setSocialProvider } = useSocialRedirectContext();
|
|
112
112
|
usePreventPageScroll(showAuthFlow);
|
|
113
|
-
const userWallets =
|
|
113
|
+
const { userWallets } = useInternalUserWallets();
|
|
114
114
|
const handleClose = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
115
115
|
var _a;
|
|
116
116
|
if (viewsToDisableCloseOnOverlayClick.includes(view.type))
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
8
|
|
|
9
|
-
const ModalCard = ({ children, borderRadius = 'default', border = false, sharpBottomRadiusOnMobile = true, dataTestId = 'modal-card', }) => (jsxRuntime.jsx("div", { "data-testid": dataTestId, className: classNames.classNames('modal-card', {
|
|
9
|
+
const ModalCard = ({ children, borderRadius = 'default', border = false, sharpBottomRadiusOnMobile = true, dataTestId = 'modal-card', sharpBorder = false, dropShadow = true, }) => (jsxRuntime.jsx("div", { "data-testid": dataTestId, className: classNames.classNames('modal-card', {
|
|
10
|
+
'modal-card--no-shadow': !dropShadow,
|
|
11
|
+
'modal-card--sharp-border-radius': sharpBorder,
|
|
10
12
|
'modal-card--sharp-mobile-bottom-radius': sharpBottomRadiusOnMobile,
|
|
11
13
|
'modal-card--with-border': border,
|
|
12
14
|
}, `modal-card--radius-${borderRadius}`), children: children }));
|
|
@@ -5,6 +5,8 @@ type ModalCardProps = {
|
|
|
5
5
|
/** Whether to display sharp border radius on last child in mobile */
|
|
6
6
|
sharpBottomRadiusOnMobile?: boolean;
|
|
7
7
|
dataTestId?: string;
|
|
8
|
+
sharpBorder?: boolean;
|
|
9
|
+
dropShadow?: boolean;
|
|
8
10
|
};
|
|
9
11
|
export declare const ModalCard: FC<PropsWithChildren<ModalCardProps>>;
|
|
10
12
|
export {};
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
4
|
|
|
5
|
-
const ModalCard = ({ children, borderRadius = 'default', border = false, sharpBottomRadiusOnMobile = true, dataTestId = 'modal-card', }) => (jsx("div", { "data-testid": dataTestId, className: classNames('modal-card', {
|
|
5
|
+
const ModalCard = ({ children, borderRadius = 'default', border = false, sharpBottomRadiusOnMobile = true, dataTestId = 'modal-card', sharpBorder = false, dropShadow = true, }) => (jsx("div", { "data-testid": dataTestId, className: classNames('modal-card', {
|
|
6
|
+
'modal-card--no-shadow': !dropShadow,
|
|
7
|
+
'modal-card--sharp-border-radius': sharpBorder,
|
|
6
8
|
'modal-card--sharp-mobile-bottom-radius': sharpBottomRadiusOnMobile,
|
|
7
9
|
'modal-card--with-border': border,
|
|
8
10
|
}, `modal-card--radius-${borderRadius}`), children: children }));
|
|
@@ -8,8 +8,8 @@ var UserWalletsContext = require('../../context/UserWalletsContext/UserWalletsCo
|
|
|
8
8
|
var UserWallet = require('./UserWallet/UserWallet.cjs');
|
|
9
9
|
|
|
10
10
|
const UserWalletsList = ({ onSelectWallet, wallets: providedWallets, }) => {
|
|
11
|
-
const
|
|
12
|
-
const wallets = providedWallets !== null && providedWallets !== void 0 ? providedWallets :
|
|
11
|
+
const { userWallets } = UserWalletsContext.useInternalUserWallets();
|
|
12
|
+
const wallets = providedWallets !== null && providedWallets !== void 0 ? providedWallets : userWallets;
|
|
13
13
|
return (jsxRuntime.jsx("div", { className: 'user-wallets-list', children: wallets.map((wallet) => (jsxRuntime.jsx(UserWallet.UserWallet, { wallet: wallet, onSelect: () => onSelectWallet === null || onSelectWallet === void 0 ? void 0 : onSelectWallet(wallet) }, wallet.id))) }));
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { useInternalUserWallets } from '../../context/UserWalletsContext/UserWalletsContext.js';
|
|
4
4
|
import { UserWallet } from './UserWallet/UserWallet.js';
|
|
5
5
|
|
|
6
6
|
const UserWalletsList = ({ onSelectWallet, wallets: providedWallets, }) => {
|
|
7
|
-
const
|
|
8
|
-
const wallets = providedWallets !== null && providedWallets !== void 0 ? providedWallets :
|
|
7
|
+
const { userWallets } = useInternalUserWallets();
|
|
8
|
+
const wallets = providedWallets !== null && providedWallets !== void 0 ? providedWallets : userWallets;
|
|
9
9
|
return (jsx("div", { className: 'user-wallets-list', children: wallets.map((wallet) => (jsx(UserWallet, { wallet: wallet, onSelect: () => onSelectWallet === null || onSelectWallet === void 0 ? void 0 : onSelectWallet(wallet) }, wallet.id))) }));
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -83,6 +83,7 @@ require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
|
83
83
|
var useEndUserWarning = require('../../utils/hooks/useEndUserWarning/useEndUserWarning.cjs');
|
|
84
84
|
var useDeviceFingerprint = require('../../utils/hooks/useDeviceFingerprint/useDeviceFingerprint.cjs');
|
|
85
85
|
var useAggregateWalletEvents = require('../../utils/hooks/useAggregateWalletEvents/useAggregateWalletEvents.cjs');
|
|
86
|
+
var useClientSessionKeys = require('../../utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs');
|
|
86
87
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
87
88
|
require('../../components/IconButton/IconButton.cjs');
|
|
88
89
|
require('../../components/InlineWidget/InlineWidget.cjs');
|
|
@@ -222,6 +223,8 @@ const InnerDynamicContextProvider = (props) => {
|
|
|
222
223
|
}
|
|
223
224
|
// Calculates and stores a device fingerprint
|
|
224
225
|
useDeviceFingerprint.useDeviceFingerprint();
|
|
226
|
+
// Generate client session keys
|
|
227
|
+
useClientSessionKeys.useClientSessionKeys();
|
|
225
228
|
const isAuthenticated = Boolean(user$1);
|
|
226
229
|
const [qrcodeUri, setQrcodeUri] = React.useState('');
|
|
227
230
|
const [desktopUri, setDesktopUri] = React.useState('');
|
|
@@ -79,6 +79,7 @@ import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
|
79
79
|
import { useEndUserWarning } from '../../utils/hooks/useEndUserWarning/useEndUserWarning.js';
|
|
80
80
|
import { useDeviceFingerprint } from '../../utils/hooks/useDeviceFingerprint/useDeviceFingerprint.js';
|
|
81
81
|
import { useAggregateWalletEvents } from '../../utils/hooks/useAggregateWalletEvents/useAggregateWalletEvents.js';
|
|
82
|
+
import { useClientSessionKeys } from '../../utils/hooks/useClientSessionKeys/useClientSessionKeys.js';
|
|
82
83
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
83
84
|
import '../../components/IconButton/IconButton.js';
|
|
84
85
|
import '../../components/InlineWidget/InlineWidget.js';
|
|
@@ -218,6 +219,8 @@ const InnerDynamicContextProvider = (props) => {
|
|
|
218
219
|
}
|
|
219
220
|
// Calculates and stores a device fingerprint
|
|
220
221
|
useDeviceFingerprint();
|
|
222
|
+
// Generate client session keys
|
|
223
|
+
useClientSessionKeys();
|
|
221
224
|
const isAuthenticated = Boolean(user);
|
|
222
225
|
const [qrcodeUri, setQrcodeUri] = useState('');
|
|
223
226
|
const [desktopUri, setDesktopUri] = useState('');
|
|
@@ -64,7 +64,7 @@ const useInternalUserWallets = () => {
|
|
|
64
64
|
return context;
|
|
65
65
|
};
|
|
66
66
|
/** Provides access to the current user/session wallets */
|
|
67
|
-
const
|
|
67
|
+
const useUserWalletsExternal = () => {
|
|
68
68
|
var _a;
|
|
69
69
|
const context = React.useContext(UserWalletsContext);
|
|
70
70
|
// EXPLANATION:
|
|
@@ -100,4 +100,4 @@ const useUserWallets = () => {
|
|
|
100
100
|
exports.UserWalletsContext = UserWalletsContext;
|
|
101
101
|
exports.UserWalletsProvider = UserWalletsProvider;
|
|
102
102
|
exports.useInternalUserWallets = useInternalUserWallets;
|
|
103
|
-
exports.
|
|
103
|
+
exports.useUserWalletsExternal = useUserWalletsExternal;
|
|
@@ -18,4 +18,4 @@ export declare const UserWalletsProvider: FC<PropsWithChildren>;
|
|
|
18
18
|
/** Provides access to state and setters of the current user/session wallets array */
|
|
19
19
|
export declare const useInternalUserWallets: () => UserWalletsContextType;
|
|
20
20
|
/** Provides access to the current user/session wallets */
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const useUserWalletsExternal: () => Wallet<import("dist/packages/wallet-connector-core/src").WalletConnectorCore.WalletConnector>[];
|
|
@@ -60,7 +60,7 @@ const useInternalUserWallets = () => {
|
|
|
60
60
|
return context;
|
|
61
61
|
};
|
|
62
62
|
/** Provides access to the current user/session wallets */
|
|
63
|
-
const
|
|
63
|
+
const useUserWalletsExternal = () => {
|
|
64
64
|
var _a;
|
|
65
65
|
const context = useContext(UserWalletsContext);
|
|
66
66
|
// EXPLANATION:
|
|
@@ -93,4 +93,4 @@ const useUserWallets = () => {
|
|
|
93
93
|
return verifiedUserWallets.current;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
export { UserWalletsContext, UserWalletsProvider, useInternalUserWallets,
|
|
96
|
+
export { UserWalletsContext, UserWalletsProvider, useInternalUserWallets, useUserWalletsExternal };
|
package/src/lib/data/api/api.cjs
CHANGED
|
@@ -32,6 +32,7 @@ require('../../locale/locale.cjs');
|
|
|
32
32
|
require('../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
33
33
|
require('../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
34
34
|
require('../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
35
|
+
var getClientSessionKeys = require('../../utils/functions/clientSessionKeys/getClientSessionKeys.cjs');
|
|
35
36
|
|
|
36
37
|
const sdkApi = ({ customHeaders } = {}) => {
|
|
37
38
|
const settings = {
|
|
@@ -46,6 +47,10 @@ const sdkApi = ({ customHeaders } = {}) => {
|
|
|
46
47
|
if (deviceFingerprint) {
|
|
47
48
|
settings.headers['x-dyn-device-fingerprint'] = deviceFingerprint;
|
|
48
49
|
}
|
|
50
|
+
const sessionPublicKey = getClientSessionKeys.getClientSessionPublicKey();
|
|
51
|
+
if (sessionPublicKey) {
|
|
52
|
+
settings.headers['x-dyn-session-public-key'] = sessionPublicKey;
|
|
53
|
+
}
|
|
49
54
|
const projectSettings$1 = projectSettings.getProjectSettings();
|
|
50
55
|
const credentials = projectSettings$1 && isCookieEnabled.isCookieEnabled(projectSettings$1) ? 'include' : undefined;
|
|
51
56
|
settings.headers['x-dyn-version'] = `WalletKit/${version.VERSION}`;
|
package/src/lib/data/api/api.js
CHANGED
|
@@ -28,6 +28,7 @@ import '../../locale/locale.js';
|
|
|
28
28
|
import '../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
29
29
|
import '../../store/state/primaryWalletId/primaryWalletId.js';
|
|
30
30
|
import '../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
31
|
+
import { getClientSessionPublicKey } from '../../utils/functions/clientSessionKeys/getClientSessionKeys.js';
|
|
31
32
|
|
|
32
33
|
const sdkApi = ({ customHeaders } = {}) => {
|
|
33
34
|
const settings = {
|
|
@@ -42,6 +43,10 @@ const sdkApi = ({ customHeaders } = {}) => {
|
|
|
42
43
|
if (deviceFingerprint) {
|
|
43
44
|
settings.headers['x-dyn-device-fingerprint'] = deviceFingerprint;
|
|
44
45
|
}
|
|
46
|
+
const sessionPublicKey = getClientSessionPublicKey();
|
|
47
|
+
if (sessionPublicKey) {
|
|
48
|
+
settings.headers['x-dyn-session-public-key'] = sessionPublicKey;
|
|
49
|
+
}
|
|
45
50
|
const projectSettings = getProjectSettings();
|
|
46
51
|
const credentials = projectSettings && isCookieEnabled(projectSettings) ? 'include' : undefined;
|
|
47
52
|
settings.headers['x-dyn-version'] = `WalletKit/${VERSION}`;
|
|
@@ -508,6 +508,21 @@ const translation = {
|
|
|
508
508
|
title: 'Deposit',
|
|
509
509
|
receive_funds_on: 'You can receive tokens on ',
|
|
510
510
|
},
|
|
511
|
+
dyn_exchange_transfer_confirmation: {
|
|
512
|
+
title: 'Deposit Confirmation',
|
|
513
|
+
from: 'From',
|
|
514
|
+
to: 'To',
|
|
515
|
+
fee: 'Network Fee',
|
|
516
|
+
fee_not_found: 'N/A',
|
|
517
|
+
receive: 'Receive',
|
|
518
|
+
cost: 'Amount + Fees',
|
|
519
|
+
cost_no_fee: 'Amount',
|
|
520
|
+
terms: 'By confirming I agree to the Terms of Service and acknowledge this deposit is final.',
|
|
521
|
+
send: 'Send {{fiatCurrencySymbol}}{{fiatCurrency}}',
|
|
522
|
+
confirm: 'Confirm',
|
|
523
|
+
cancel: 'Cancel',
|
|
524
|
+
account: 'User {{exchange}}',
|
|
525
|
+
},
|
|
511
526
|
/**
|
|
512
527
|
* @description copy keys for embedded wallet authenticator choice view
|
|
513
528
|
* @default
|
|
@@ -502,6 +502,21 @@ export declare const translation: {
|
|
|
502
502
|
title: string;
|
|
503
503
|
receive_funds_on: string;
|
|
504
504
|
};
|
|
505
|
+
dyn_exchange_transfer_confirmation: {
|
|
506
|
+
title: string;
|
|
507
|
+
from: string;
|
|
508
|
+
to: string;
|
|
509
|
+
fee: string;
|
|
510
|
+
fee_not_found: string;
|
|
511
|
+
receive: string;
|
|
512
|
+
cost: string;
|
|
513
|
+
cost_no_fee: string;
|
|
514
|
+
terms: string;
|
|
515
|
+
send: string;
|
|
516
|
+
confirm: string;
|
|
517
|
+
cancel: string;
|
|
518
|
+
account: string;
|
|
519
|
+
};
|
|
505
520
|
/**
|
|
506
521
|
* @description copy keys for embedded wallet authenticator choice view
|
|
507
522
|
* @default
|
|
@@ -504,6 +504,21 @@ const translation = {
|
|
|
504
504
|
title: 'Deposit',
|
|
505
505
|
receive_funds_on: 'You can receive tokens on ',
|
|
506
506
|
},
|
|
507
|
+
dyn_exchange_transfer_confirmation: {
|
|
508
|
+
title: 'Deposit Confirmation',
|
|
509
|
+
from: 'From',
|
|
510
|
+
to: 'To',
|
|
511
|
+
fee: 'Network Fee',
|
|
512
|
+
fee_not_found: 'N/A',
|
|
513
|
+
receive: 'Receive',
|
|
514
|
+
cost: 'Amount + Fees',
|
|
515
|
+
cost_no_fee: 'Amount',
|
|
516
|
+
terms: 'By confirming I agree to the Terms of Service and acknowledge this deposit is final.',
|
|
517
|
+
send: 'Send {{fiatCurrencySymbol}}{{fiatCurrency}}',
|
|
518
|
+
confirm: 'Confirm',
|
|
519
|
+
cancel: 'Cancel',
|
|
520
|
+
account: 'User {{exchange}}',
|
|
521
|
+
},
|
|
507
522
|
/**
|
|
508
523
|
* @description copy keys for embedded wallet authenticator choice view
|
|
509
524
|
* @default
|