@dynamic-labs/sdk-react-core 4.22.7 → 4.23.0
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 +21 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/index.cjs +2 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -1
- package/src/lib/client/client.cjs +2 -0
- package/src/lib/client/client.d.ts +1 -0
- package/src/lib/client/client.js +2 -1
- package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.cjs +5 -1
- package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.js +5 -1
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs +24 -6
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.d.ts +1 -1
- package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js +26 -8
- package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.cjs +1 -1
- package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.js +1 -1
- package/src/lib/components/Search/Search.cjs +5 -1
- package/src/lib/components/Search/Search.js +5 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +1 -1
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +9 -2
- package/src/lib/events/dynamicEvents.cjs +1 -0
- package/src/lib/events/dynamicEvents.d.ts +2 -2
- package/src/lib/events/dynamicEvents.js +1 -0
- package/src/lib/events/wallets.d.ts +2 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +28 -0
- package/src/lib/locale/en/translation.d.ts +28 -0
- package/src/lib/locale/en/translation.js +28 -0
- package/src/lib/shared/logger.cjs +1 -1
- package/src/lib/shared/logger.js +2 -2
- 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 +1 -0
- package/src/lib/utils/constants/authViewLayoutChecks.js +1 -0
- package/src/lib/utils/functions/getSessionInformation/getSessionInformation.cjs +1 -1
- package/src/lib/utils/functions/getSessionInformation/getSessionInformation.js +1 -1
- package/src/lib/utils/functions/getTimeSince/index.d.ts +1 -0
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs +1 -1
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +1 -1
- package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +1 -1
- package/src/lib/utils/hooks/index.d.ts +3 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -1
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +1 -1
- package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.cjs +15 -0
- package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.d.ts +6 -0
- package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.js +11 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +13 -6
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +13 -6
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.cjs +1 -1
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.js +1 -1
- package/src/lib/utils/hooks/useIsMfaEnabled/index.d.ts +1 -0
- package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.cjs +15 -0
- package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.d.ts +1 -0
- package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.js +11 -0
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/index.d.ts +1 -0
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.cjs +15 -0
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.d.ts +1 -0
- package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js +11 -0
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/index.d.ts +1 -0
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.cjs +15 -0
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.d.ts +1 -0
- package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.js +11 -0
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +1 -1
- package/src/lib/utils/hooks/useMfa/useMfa.js +1 -1
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +33 -18
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.d.ts +4 -0
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +33 -18
- package/src/lib/utils/hooks/useRefreshUserState/useRefreshUserState.cjs +1 -1
- package/src/lib/utils/hooks/useRefreshUserState/useRefreshUserState.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/useTokenBalances/useTokenBalances.cjs +1 -1
- package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +1 -1
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.cjs +1 -1
- package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.js +1 -1
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +1 -1
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +1 -1
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +43 -6
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +43 -6
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
- package/src/lib/views/ExchangeList/ExchangeList.cjs +5 -5
- package/src/lib/views/ExchangeList/ExchangeList.js +5 -5
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +2 -2
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +2 -2
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +1 -1
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +4 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +2 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +4 -2
- package/src/lib/views/WalletList/WalletList.cjs +1 -1
- package/src/lib/views/WalletList/WalletList.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -4
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -2
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +0 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.d.ts +0 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +0 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +42 -106
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +43 -107
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +119 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.d.ts +6 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +115 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.cjs +170 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.js +166 -0
- package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView/ManageMfaWidgetView.cjs → ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.cjs} +8 -7
- package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView/ManageMfaWidgetView.js → ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.js} +7 -6
- package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +5 -4
- package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +5 -4
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/index.d.ts +0 -1
- /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.cjs +0 -0
- /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.d.ts +0 -0
- /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.js +0 -0
- /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/index.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.cjs +0 -0
- /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.23.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.8...v4.23.0) (2025-07-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add passkey to react-native ([#9111](https://github.com/dynamic-labs/dynamic-auth/issues/9111)) ([b06e971](https://github.com/dynamic-labs/dynamic-auth/commit/b06e9718537519e25ffef50dfb616964316d8a99))
|
|
8
|
+
* add walletConnectionFailed event ([#9152](https://github.com/dynamic-labs/dynamic-auth/issues/9152)) ([ebdd06f](https://github.com/dynamic-labs/dynamic-auth/commit/ebdd06f6b799867db35f784d84a345f8f91fedb1))
|
|
9
|
+
* selectWalletOption now resolves to the connected wallet ([#9153](https://github.com/dynamic-labs/dynamic-auth/issues/9153)) ([775430c](https://github.com/dynamic-labs/dynamic-auth/commit/775430cd2d2b60a4010b70301db298b72dfb8f1e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* zod import reference with parser bundler ([#9157](https://github.com/dynamic-labs/dynamic-auth/issues/9157)) ([6dfe18d](https://github.com/dynamic-labs/dynamic-auth/commit/6dfe18d583ba6356205030ad4151b3312513ca46))
|
|
15
|
+
|
|
16
|
+
### [4.22.8](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.7...v4.22.8) (2025-07-10)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* prevent BackupUnsuccessfulView modal from being closed ([#9147](https://github.com/dynamic-labs/dynamic-auth/issues/9147)) ([352e451](https://github.com/dynamic-labs/dynamic-auth/commit/352e4513918418f5ddd11beee95a88713cdb586e))
|
|
22
|
+
|
|
2
23
|
### [4.22.7](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.6...v4.22.7) (2025-07-09)
|
|
3
24
|
|
|
4
25
|
|
package/package.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.
|
|
6
|
+
var version = "4.23.0";
|
|
7
7
|
var dependencies = {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.0.706",
|
|
9
|
-
"@dynamic-labs-sdk/client": "0.0.1-alpha.
|
|
9
|
+
"@dynamic-labs-sdk/client": "0.0.1-alpha.14",
|
|
10
10
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
11
11
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
12
12
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.
|
|
2
|
+
var version = "4.23.0";
|
|
3
3
|
var dependencies = {
|
|
4
4
|
"@dynamic-labs/sdk-api-core": "0.0.706",
|
|
5
|
-
"@dynamic-labs-sdk/client": "0.0.1-alpha.
|
|
5
|
+
"@dynamic-labs-sdk/client": "0.0.1-alpha.14",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
8
8
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.706",
|
|
6
|
-
"@dynamic-labs-sdk/client": "0.0.1-alpha.
|
|
6
|
+
"@dynamic-labs-sdk/client": "0.0.1-alpha.14",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
8
8
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
9
9
|
"country-list": "2.3.0",
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"react-international-phone": "4.5.0",
|
|
17
17
|
"bs58": "5.0.0",
|
|
18
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
19
|
-
"@dynamic-labs/iconic": "4.
|
|
20
|
-
"@dynamic-labs/logger": "4.
|
|
21
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
22
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
23
|
-
"@dynamic-labs/store": "4.
|
|
24
|
-
"@dynamic-labs/types": "4.
|
|
25
|
-
"@dynamic-labs/utils": "4.
|
|
26
|
-
"@dynamic-labs/wallet-book": "4.
|
|
27
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
18
|
+
"@dynamic-labs/assert-package-version": "4.23.0",
|
|
19
|
+
"@dynamic-labs/iconic": "4.23.0",
|
|
20
|
+
"@dynamic-labs/logger": "4.23.0",
|
|
21
|
+
"@dynamic-labs/multi-wallet": "4.23.0",
|
|
22
|
+
"@dynamic-labs/rpc-providers": "4.23.0",
|
|
23
|
+
"@dynamic-labs/store": "4.23.0",
|
|
24
|
+
"@dynamic-labs/types": "4.23.0",
|
|
25
|
+
"@dynamic-labs/utils": "4.23.0",
|
|
26
|
+
"@dynamic-labs/wallet-book": "4.23.0",
|
|
27
|
+
"@dynamic-labs/wallet-connector-core": "4.23.0",
|
|
28
28
|
"eventemitter3": "5.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
package/src/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var dynamicEvents = require('./lib/events/dynamicEvents.cjs');
|
|
|
65
65
|
var api = require('./lib/data/api/api.cjs');
|
|
66
66
|
require('@dynamic-labs-sdk/client/core');
|
|
67
67
|
require('@dynamic-labs-sdk/client');
|
|
68
|
-
require('./lib/client/client.cjs');
|
|
68
|
+
var client = require('./lib/client/client.cjs');
|
|
69
69
|
require('@dynamic-labs/multi-wallet');
|
|
70
70
|
require('react-international-phone');
|
|
71
71
|
var mergeNetworks = require('./lib/utils/functions/mergeNetworks/mergeNetworks.cjs');
|
|
@@ -241,6 +241,7 @@ exports.useWalletConnectorEvent = useWalletConnectorEvent.useWalletConnectorEven
|
|
|
241
241
|
exports.useAuthenticateConnectedUser = useAuthenticateConnectedUser.useAuthenticateConnectedUser;
|
|
242
242
|
exports.dynamicEvents = dynamicEvents.publicDynamicEvents;
|
|
243
243
|
exports.apiClient = api.sdkApi;
|
|
244
|
+
exports.useDynamicClient = client.useDynamicClient;
|
|
244
245
|
exports.mergeNetworks = mergeNetworks.mergeNetworks;
|
|
245
246
|
exports.overrideNetworkRpcUrl = overrideNetworkRpcUrl.overrideNetworkRpcUrl;
|
|
246
247
|
exports.isAuthenticatedWithAWallet = isAuthenticatedWithAWallet.isAuthenticatedWithAWallet;
|
package/src/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { useDynamicContext } from './lib/context/DynamicContext/useDynamicContex
|
|
|
10
10
|
export { useDynamicScopes } from './lib/utils/hooks/useDynamicScopes';
|
|
11
11
|
export { useUserWalletsExternal as useUserWallets } from './lib/context/UserWalletsContext';
|
|
12
12
|
export { DynamicConnectButton, ShadowDOM, IsBrowser } from './lib/components';
|
|
13
|
+
export { useDynamicClient } from './lib/client';
|
|
13
14
|
export { DynamicBridgeWidget, DynamicEmbeddedAuthFlow, DynamicEmbeddedUserProfile, DynamicEmbeddedWidget, DynamicMultiWalletPromptsWidget, DynamicNav, DynamicUserProfile, DynamicWidget,
|
|
14
15
|
/** @deprecated use OnrampWidget instead */
|
|
15
16
|
OnrampWidget as FundingWidget, OnrampWidget, } from './lib/widgets';
|
package/src/index.js
CHANGED
|
@@ -61,7 +61,7 @@ export { publicDynamicEvents as dynamicEvents } from './lib/events/dynamicEvents
|
|
|
61
61
|
export { sdkApi as apiClient } from './lib/data/api/api.js';
|
|
62
62
|
import '@dynamic-labs-sdk/client/core';
|
|
63
63
|
import '@dynamic-labs-sdk/client';
|
|
64
|
-
|
|
64
|
+
export { useDynamicClient } from './lib/client/client.js';
|
|
65
65
|
import '@dynamic-labs/multi-wallet';
|
|
66
66
|
import 'react-international-phone';
|
|
67
67
|
export { mergeNetworks } from './lib/utils/functions/mergeNetworks/mergeNetworks.js';
|
|
@@ -17,6 +17,7 @@ const setDynamicClient = (newClient) => {
|
|
|
17
17
|
dynamicClient = newClient;
|
|
18
18
|
dynamicClientEmitter.emit('changed', newClient);
|
|
19
19
|
};
|
|
20
|
+
const hasDynamicClient = () => dynamicClient !== null;
|
|
20
21
|
const getDynamicClient = () => {
|
|
21
22
|
if (!dynamicClient) {
|
|
22
23
|
throw new utils.DynamicError('Tried to getClient when it was still null');
|
|
@@ -39,5 +40,6 @@ const useDynamicClient = () => {
|
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
exports.getDynamicClient = getDynamicClient;
|
|
43
|
+
exports.hasDynamicClient = hasDynamicClient;
|
|
42
44
|
exports.setDynamicClient = setDynamicClient;
|
|
43
45
|
exports.useDynamicClient = useDynamicClient;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DynamicClient } from '@dynamic-labs-sdk/client';
|
|
2
2
|
export declare const setDynamicClient: (newClient: DynamicClient) => void;
|
|
3
|
+
export declare const hasDynamicClient: () => boolean;
|
|
3
4
|
export declare const getDynamicClient: () => DynamicClient;
|
|
4
5
|
/**
|
|
5
6
|
* Not many customers will ever change the client mid execution, but demo v2 will.
|
package/src/lib/client/client.js
CHANGED
|
@@ -9,6 +9,7 @@ const setDynamicClient = (newClient) => {
|
|
|
9
9
|
dynamicClient = newClient;
|
|
10
10
|
dynamicClientEmitter.emit('changed', newClient);
|
|
11
11
|
};
|
|
12
|
+
const hasDynamicClient = () => dynamicClient !== null;
|
|
12
13
|
const getDynamicClient = () => {
|
|
13
14
|
if (!dynamicClient) {
|
|
14
15
|
throw new DynamicError('Tried to getClient when it was still null');
|
|
@@ -30,4 +31,4 @@ const useDynamicClient = () => {
|
|
|
30
31
|
return client;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
export { getDynamicClient, setDynamicClient, useDynamicClient };
|
|
34
|
+
export { getDynamicClient, hasDynamicClient, setDynamicClient, useDynamicClient };
|
package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.cjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Applies mock responses to requests that are not expected to be while in dog-feeding phase of the SDK.
|
|
@@ -21,7 +22,10 @@ const fetchOverride = (req, init) => _tslib.__awaiter(void 0, void 0, void 0, fu
|
|
|
21
22
|
if (req.toString().includes('settings')) {
|
|
22
23
|
return new Response(JSON.stringify(null), { status: 200 });
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* We need to use the FetchService.fetch for ReactNative, Flutter and Unity3d SDKs.
|
|
27
|
+
*/
|
|
28
|
+
return utils.FetchService.fetch(req, init);
|
|
25
29
|
});
|
|
26
30
|
|
|
27
31
|
exports.fetchOverride = fetchOverride;
|
package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { FetchService } from '@dynamic-labs/utils';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Applies mock responses to requests that are not expected to be while in dog-feeding phase of the SDK.
|
|
@@ -17,7 +18,10 @@ const fetchOverride = (req, init) => __awaiter(void 0, void 0, void 0, function*
|
|
|
17
18
|
if (req.toString().includes('settings')) {
|
|
18
19
|
return new Response(JSON.stringify(null), { status: 200 });
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
/**
|
|
22
|
+
* We need to use the FetchService.fetch for ReactNative, Flutter and Unity3d SDKs.
|
|
23
|
+
*/
|
|
24
|
+
return FetchService.fetch(req, init);
|
|
21
25
|
});
|
|
22
26
|
|
|
23
27
|
export { fetchOverride };
|
|
@@ -12,8 +12,29 @@ var fetchOverride = require('./fetchOverride/fetchOverride.cjs');
|
|
|
12
12
|
var getApiHeaders = require('./getApiHeaders/getApiHeaders.cjs');
|
|
13
13
|
var syncEvents = require('./syncEvents/syncEvents.cjs');
|
|
14
14
|
|
|
15
|
-
const useInitializeSdkClient = ({ settings }) => {
|
|
15
|
+
const useInitializeSdkClient = ({ settings, client: clientFromProps, }) => {
|
|
16
16
|
const lastClientDependencyKey = React.useRef(null);
|
|
17
|
+
/**
|
|
18
|
+
* Sets the client to the state and setup the extensions.
|
|
19
|
+
*/
|
|
20
|
+
const setClient = (client$2) => {
|
|
21
|
+
if (client.hasExtension(client$2, constants.CLIENT_EXTENSION_NAME)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
client$1.setDynamicClient(client$2);
|
|
25
|
+
core.registerExtension(client$2, constants.CLIENT_EXTENSION_NAME);
|
|
26
|
+
syncEvents.syncEvents(client$2);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* If a client is provided by the props, we should use it instead of
|
|
30
|
+
* creating a new one.
|
|
31
|
+
*/
|
|
32
|
+
if (clientFromProps) {
|
|
33
|
+
if (!client$1.hasDynamicClient() || client$1.getDynamicClient() !== clientFromProps) {
|
|
34
|
+
setClient(clientFromProps);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
17
38
|
const clientDependencyKey = [
|
|
18
39
|
settings.apiBaseUrl,
|
|
19
40
|
settings.environmentId,
|
|
@@ -21,17 +42,14 @@ const useInitializeSdkClient = ({ settings }) => {
|
|
|
21
42
|
if (lastClientDependencyKey.current === clientDependencyKey)
|
|
22
43
|
return;
|
|
23
44
|
lastClientDependencyKey.current = clientDependencyKey;
|
|
24
|
-
|
|
45
|
+
setClient(client.createDynamicClient({
|
|
25
46
|
coreConfig: {
|
|
26
47
|
apiBaseUrl: settings.apiBaseUrl,
|
|
27
48
|
fetch: fetchOverride.fetchOverride,
|
|
28
49
|
getApiHeaders: getApiHeaders.getApiHeaders,
|
|
29
50
|
},
|
|
30
51
|
environmentId: settings.environmentId,
|
|
31
|
-
});
|
|
32
|
-
client$1.setDynamicClient(newClient);
|
|
33
|
-
core.registerExtension(newClient, constants.CLIENT_EXTENSION_NAME);
|
|
34
|
-
syncEvents.syncEvents(newClient);
|
|
52
|
+
}));
|
|
35
53
|
};
|
|
36
54
|
|
|
37
55
|
exports.useInitializeSdkClient = useInitializeSdkClient;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DynamicContextProps } from '../../../../context/DynamicContext';
|
|
2
|
-
export declare const useInitializeSdkClient: ({ settings }: DynamicContextProps) => void;
|
|
2
|
+
export declare const useInitializeSdkClient: ({ settings, client: clientFromProps, }: DynamicContextProps) => void;
|
|
@@ -1,15 +1,36 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { useRef } from 'react';
|
|
3
|
-
import { createDynamicClient } from '@dynamic-labs-sdk/client';
|
|
3
|
+
import { createDynamicClient, hasExtension } from '@dynamic-labs-sdk/client';
|
|
4
4
|
import { registerExtension } from '@dynamic-labs-sdk/client/core';
|
|
5
|
-
import { setDynamicClient } from '../../../client.js';
|
|
5
|
+
import { setDynamicClient, hasDynamicClient, getDynamicClient } from '../../../client.js';
|
|
6
6
|
import { CLIENT_EXTENSION_NAME } from '../../constants.js';
|
|
7
7
|
import { fetchOverride } from './fetchOverride/fetchOverride.js';
|
|
8
8
|
import { getApiHeaders } from './getApiHeaders/getApiHeaders.js';
|
|
9
9
|
import { syncEvents } from './syncEvents/syncEvents.js';
|
|
10
10
|
|
|
11
|
-
const useInitializeSdkClient = ({ settings }) => {
|
|
11
|
+
const useInitializeSdkClient = ({ settings, client: clientFromProps, }) => {
|
|
12
12
|
const lastClientDependencyKey = useRef(null);
|
|
13
|
+
/**
|
|
14
|
+
* Sets the client to the state and setup the extensions.
|
|
15
|
+
*/
|
|
16
|
+
const setClient = (client) => {
|
|
17
|
+
if (hasExtension(client, CLIENT_EXTENSION_NAME)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
setDynamicClient(client);
|
|
21
|
+
registerExtension(client, CLIENT_EXTENSION_NAME);
|
|
22
|
+
syncEvents(client);
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* If a client is provided by the props, we should use it instead of
|
|
26
|
+
* creating a new one.
|
|
27
|
+
*/
|
|
28
|
+
if (clientFromProps) {
|
|
29
|
+
if (!hasDynamicClient() || getDynamicClient() !== clientFromProps) {
|
|
30
|
+
setClient(clientFromProps);
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
13
34
|
const clientDependencyKey = [
|
|
14
35
|
settings.apiBaseUrl,
|
|
15
36
|
settings.environmentId,
|
|
@@ -17,17 +38,14 @@ const useInitializeSdkClient = ({ settings }) => {
|
|
|
17
38
|
if (lastClientDependencyKey.current === clientDependencyKey)
|
|
18
39
|
return;
|
|
19
40
|
lastClientDependencyKey.current = clientDependencyKey;
|
|
20
|
-
|
|
41
|
+
setClient(createDynamicClient({
|
|
21
42
|
coreConfig: {
|
|
22
43
|
apiBaseUrl: settings.apiBaseUrl,
|
|
23
44
|
fetch: fetchOverride,
|
|
24
45
|
getApiHeaders,
|
|
25
46
|
},
|
|
26
47
|
environmentId: settings.environmentId,
|
|
27
|
-
});
|
|
28
|
-
setDynamicClient(newClient);
|
|
29
|
-
registerExtension(newClient, CLIENT_EXTENSION_NAME);
|
|
30
|
-
syncEvents(newClient);
|
|
48
|
+
}));
|
|
31
49
|
};
|
|
32
50
|
|
|
33
51
|
export { useInitializeSdkClient };
|
|
@@ -22,6 +22,6 @@ var Typography = require('../../Typography/Typography.cjs');
|
|
|
22
22
|
const DropdownMenu = ({ options, setShowMenu, }) => (jsxRuntime.jsx("div", { className: 'dots-menu-dropdown__container', style: { zIndex: index.tooltipZIndex }, children: options.map((option) => option.hide ? null : (jsxRuntime.jsxs("div", { className: 'dots-menu-dropdown__item', onClick: () => {
|
|
23
23
|
option.callback();
|
|
24
24
|
setShowMenu(false);
|
|
25
|
-
}, children: [option.Icon && jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: option.Icon }), jsxRuntime.jsxs(Typography.Typography, { className: 'dots-menu-dropdown__item-text', color: option.fontColor ? option.fontColor : 'secondary', weight: option.fontWeight, children: [option.text, " ", option.badge ? jsxRuntime.jsx(Badge.Badge, { text: option.badge }) : null] }), option.endSlot && (jsxRuntime.jsx("div", { className: 'dots-menu-dropdown__item__end-slot', children: option.endSlot }))] }, option.text))) }));
|
|
25
|
+
}, children: [option.Icon && jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: option.Icon }), jsxRuntime.jsxs(Typography.Typography, { copykey: option.copykey, className: 'dots-menu-dropdown__item-text', color: option.fontColor ? option.fontColor : 'secondary', weight: option.fontWeight, children: [option.text, " ", option.badge ? jsxRuntime.jsx(Badge.Badge, { text: option.badge }) : null] }), option.endSlot && (jsxRuntime.jsx("div", { className: 'dots-menu-dropdown__item__end-slot', children: option.endSlot }))] }, option.text))) }));
|
|
26
26
|
|
|
27
27
|
exports.DropdownMenu = DropdownMenu;
|
|
@@ -18,6 +18,6 @@ import { Typography } from '../../Typography/Typography.js';
|
|
|
18
18
|
const DropdownMenu = ({ options, setShowMenu, }) => (jsx("div", { className: 'dots-menu-dropdown__container', style: { zIndex: tooltipZIndex }, children: options.map((option) => option.hide ? null : (jsxs("div", { className: 'dots-menu-dropdown__item', onClick: () => {
|
|
19
19
|
option.callback();
|
|
20
20
|
setShowMenu(false);
|
|
21
|
-
}, children: [option.Icon && jsx(Icon, { color: 'text-tertiary', children: option.Icon }), jsxs(Typography, { className: 'dots-menu-dropdown__item-text', color: option.fontColor ? option.fontColor : 'secondary', weight: option.fontWeight, children: [option.text, " ", option.badge ? jsx(Badge, { text: option.badge }) : null] }), option.endSlot && (jsx("div", { className: 'dots-menu-dropdown__item__end-slot', children: option.endSlot }))] }, option.text))) }));
|
|
21
|
+
}, children: [option.Icon && jsx(Icon, { color: 'text-tertiary', children: option.Icon }), jsxs(Typography, { copykey: option.copykey, className: 'dots-menu-dropdown__item-text', color: option.fontColor ? option.fontColor : 'secondary', weight: option.fontWeight, children: [option.text, " ", option.badge ? jsx(Badge, { text: option.badge }) : null] }), option.endSlot && (jsx("div", { className: 'dots-menu-dropdown__item__end-slot', children: option.endSlot }))] }, option.text))) }));
|
|
22
22
|
|
|
23
23
|
export { DropdownMenu };
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
7
8
|
require('react');
|
|
8
9
|
var search = require('../../assets/search.cjs');
|
|
9
10
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
10
11
|
|
|
11
|
-
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) =>
|
|
12
|
+
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) => {
|
|
13
|
+
const { t } = reactI18next.useTranslation();
|
|
14
|
+
return (jsxRuntime.jsxs("label", { htmlFor: id, className: classNames.classNames('search__container', value ? 'search__container--active' : undefined), children: [jsxRuntime.jsx("div", { className: 'search-icon__container', children: jsxRuntime.jsx(search.ReactComponent, {}) }), jsxRuntime.jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames.classNames('search__input', className), "data-testid": 'Search', copykey: copykey }), value.length > 0 && (jsxRuntime.jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', "data-testid": 'search-clear-button', copykey: 'dyn_search.clear', children: t('dyn_search.clear') }))] }));
|
|
15
|
+
};
|
|
12
16
|
|
|
13
17
|
exports.Search = Search;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import 'react';
|
|
4
5
|
import { ReactComponent as SvgSearch } from '../../assets/search.js';
|
|
5
6
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
6
7
|
|
|
7
|
-
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) =>
|
|
8
|
+
const Search = ({ className = '', id, label, type, onChange, onBlur, name, value, onClickClear, copykey, }) => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
return (jsxs("label", { htmlFor: id, className: classNames('search__container', value ? 'search__container--active' : undefined), children: [jsx("div", { className: 'search-icon__container', children: jsx(SvgSearch, {}) }), jsx("input", { name: name, value: value, onChange: onChange, onBlur: onBlur, type: type, id: id, placeholder: label, className: classNames('search__input', className), "data-testid": 'Search', copykey: copykey }), value.length > 0 && (jsx("button", { type: 'button', onClick: onClickClear, className: 'search__button--clear', "data-testid": 'search-clear-button', copykey: 'dyn_search.clear', children: t('dyn_search.clear') }))] }));
|
|
11
|
+
};
|
|
8
12
|
|
|
9
13
|
export { Search };
|
|
@@ -9,8 +9,8 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
9
9
|
require('react');
|
|
10
10
|
require('@dynamic-labs-sdk/client');
|
|
11
11
|
require('../../../client/client.cjs');
|
|
12
|
-
require('../../../utils/constants/values.cjs');
|
|
13
12
|
require('@dynamic-labs/utils');
|
|
13
|
+
require('../../../utils/constants/values.cjs');
|
|
14
14
|
require('@dynamic-labs/multi-wallet');
|
|
15
15
|
require('../../../shared/logger.cjs');
|
|
16
16
|
require('../../../utils/constants/colors.cjs');
|
|
@@ -5,8 +5,8 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@dynamic-labs-sdk/client';
|
|
7
7
|
import '../../../client/client.js';
|
|
8
|
-
import '../../../utils/constants/values.js';
|
|
9
8
|
import '@dynamic-labs/utils';
|
|
9
|
+
import '../../../utils/constants/values.js';
|
|
10
10
|
import '@dynamic-labs/multi-wallet';
|
|
11
11
|
import '../../../shared/logger.js';
|
|
12
12
|
import '../../../utils/constants/colors.js';
|
|
@@ -9,8 +9,8 @@ require('@dynamic-labs/sdk-api-core');
|
|
|
9
9
|
require('react');
|
|
10
10
|
require('@dynamic-labs-sdk/client');
|
|
11
11
|
require('../../../client/client.cjs');
|
|
12
|
-
require('../../../utils/constants/values.cjs');
|
|
13
12
|
require('@dynamic-labs/utils');
|
|
13
|
+
require('../../../utils/constants/values.cjs');
|
|
14
14
|
require('@dynamic-labs/multi-wallet');
|
|
15
15
|
require('../../../shared/logger.cjs');
|
|
16
16
|
require('../../../utils/constants/colors.cjs');
|
|
@@ -5,8 +5,8 @@ import '@dynamic-labs/sdk-api-core';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@dynamic-labs-sdk/client';
|
|
7
7
|
import '../../../client/client.js';
|
|
8
|
-
import '../../../utils/constants/values.js';
|
|
9
8
|
import '@dynamic-labs/utils';
|
|
9
|
+
import '../../../utils/constants/values.js';
|
|
10
10
|
import '@dynamic-labs/multi-wallet';
|
|
11
11
|
import '../../../shared/logger.js';
|
|
12
12
|
import '../../../utils/constants/colors.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { DynamicClient } from '@dynamic-labs-sdk/client';
|
|
2
3
|
import { CountryIso2 } from 'react-international-phone';
|
|
3
4
|
import { LogLevel } from '@dynamic-labs/logger';
|
|
4
|
-
import { type MobileExperience, type CoinbaseWalletPreference, type SocialProviderFilter, AuthMode } from '@dynamic-labs/types';
|
|
5
|
-
import { DeepLinkVariant, WalletConnectorExtension, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
6
5
|
import { TokenBalance } from '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import { type CoinbaseWalletPreference, type MobileExperience, type SocialProviderFilter, AuthMode } from '@dynamic-labs/types';
|
|
7
|
+
import { DeepLinkVariant, WalletConnectorExtension, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
7
8
|
import { LocaleResource } from '../../../locale';
|
|
8
9
|
import { AccessDeniedCustomButton, ChainToWalletMap, DynamicEventsCallbacks, RecommendedWallet, TransactionConfirmationSettings, WalletsFilter } from '../../../shared';
|
|
9
10
|
import { DynamicHandlers } from '../../../shared/types/dynamicHandlers';
|
|
@@ -15,6 +16,12 @@ import { SocialSettings } from './SocialSettings';
|
|
|
15
16
|
export interface DynamicContextProps {
|
|
16
17
|
children: ReactNode;
|
|
17
18
|
locale?: LocaleResource;
|
|
19
|
+
/**
|
|
20
|
+
* The DynamicClient instance to use for the DynamicContext.
|
|
21
|
+
* If not provided, a new instance will be created.
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
24
|
+
client?: DynamicClient;
|
|
18
25
|
settings: {
|
|
19
26
|
accessDeniedButton?: AccessDeniedCustomButton;
|
|
20
27
|
accessDeniedMessagePrimary?: string;
|
|
@@ -13,7 +13,7 @@ import { WalletEvents } from './wallets';
|
|
|
13
13
|
/** Maps internal event names to their listeners */
|
|
14
14
|
export type DynamicEvents = AuthEvents & UIEvents & OTPEvents & WalletEvents & PasskeyEvents & SocialEvents & EmbeddedWalletEvents & MultiWalletInternalEvents & TokenBalancesEvents & UserEvents & FundingEvents;
|
|
15
15
|
/** Which events are accessible by our clients */
|
|
16
|
-
export declare const externalEvents: ("authFailure" | "authInit" | "logout" | "mfaCompletionSuccess" | "mfaCompletionFailure" | "authFlowOpen" | "authFlowClose" | "authFlowCancelled" | "walletTabSelected" | "emailVerificationResult" | "smsVerificationResult" | "walletAdded" | "walletRemoved" | "primaryWalletChanged" | "primaryWalletNetworkChanged" | "userWalletsChanged" | "embeddedWalletCreated" | "walletConnectedForFunding")[];
|
|
16
|
+
export declare const externalEvents: ("authFailure" | "authInit" | "logout" | "mfaCompletionSuccess" | "mfaCompletionFailure" | "authFlowOpen" | "authFlowClose" | "authFlowCancelled" | "walletTabSelected" | "emailVerificationResult" | "smsVerificationResult" | "walletAdded" | "walletRemoved" | "primaryWalletChanged" | "primaryWalletNetworkChanged" | "userWalletsChanged" | "walletConnectionFailed" | "embeddedWalletCreated" | "walletConnectedForFunding")[];
|
|
17
17
|
export declare const dynamicEvents: EventEmitter<DynamicEvents, any>;
|
|
18
|
-
export declare const publicDynamicEvents: EventEmitter<"authFailure" | "authInit" | "logout" | "mfaCompletionSuccess" | "mfaCompletionFailure" | "authFlowOpen" | "authFlowClose" | "authFlowCancelled" | "walletTabSelected" | "emailVerificationResult" | "smsVerificationResult" | "walletAdded" | "walletRemoved" | "primaryWalletChanged" | "primaryWalletNetworkChanged" | "userWalletsChanged" | "embeddedWalletCreated" | "walletConnectedForFunding", any>;
|
|
18
|
+
export declare const publicDynamicEvents: EventEmitter<"authFailure" | "authInit" | "logout" | "mfaCompletionSuccess" | "mfaCompletionFailure" | "authFlowOpen" | "authFlowClose" | "authFlowCancelled" | "walletTabSelected" | "emailVerificationResult" | "smsVerificationResult" | "walletAdded" | "walletRemoved" | "primaryWalletChanged" | "primaryWalletNetworkChanged" | "userWalletsChanged" | "walletConnectionFailed" | "embeddedWalletCreated" | "walletConnectedForFunding", any>;
|
|
19
19
|
export type DynamicEventEmitter = typeof dynamicEvents;
|
|
@@ -35,4 +35,6 @@ export type WalletEvents = {
|
|
|
35
35
|
userWalletsChanged: (params: UserWalletsChangedParams) => void;
|
|
36
36
|
/** Triggered when user wallets changes from an empty array to a non-empty array */
|
|
37
37
|
userWalletsPopulated: (userWallets: Wallet[]) => void;
|
|
38
|
+
/** Triggered when Dynamic fails to connect to a wallet */
|
|
39
|
+
walletConnectionFailed: (walletConnector: WalletConnector, error: unknown) => void;
|
|
38
40
|
};
|
|
@@ -131,7 +131,7 @@ const shouldNotRenderBottomNavBarOptions = [
|
|
|
131
131
|
'confirm-exchange-transfer',
|
|
132
132
|
'choose-onramp-provider',
|
|
133
133
|
'choose-linked-wallet',
|
|
134
|
-
'manage-mfa-no-footer',
|
|
134
|
+
'manage-totp-mfa-no-footer',
|
|
135
135
|
];
|
|
136
136
|
const DynamicUserProfileLayout = ({ variant, className, style, }) => {
|
|
137
137
|
const { multiWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -127,7 +127,7 @@ const shouldNotRenderBottomNavBarOptions = [
|
|
|
127
127
|
'confirm-exchange-transfer',
|
|
128
128
|
'choose-onramp-provider',
|
|
129
129
|
'choose-linked-wallet',
|
|
130
|
-
'manage-mfa-no-footer',
|
|
130
|
+
'manage-totp-mfa-no-footer',
|
|
131
131
|
];
|
|
132
132
|
const DynamicUserProfileLayout = ({ variant, className, style, }) => {
|
|
133
133
|
const { multiWallet } = useInternalDynamicContext();
|
|
@@ -1010,6 +1010,15 @@ const translation = {
|
|
|
1010
1010
|
mfa_button: 'Authenticator App',
|
|
1011
1011
|
title: '2 factor authentication',
|
|
1012
1012
|
},
|
|
1013
|
+
mfa_section: {
|
|
1014
|
+
title: 'MFA',
|
|
1015
|
+
passkey_button: 'Passkeys',
|
|
1016
|
+
totp_button: 'TOTP',
|
|
1017
|
+
},
|
|
1018
|
+
wallet_security_section: {
|
|
1019
|
+
title: 'Wallet Security',
|
|
1020
|
+
passkey_button: 'Passkeys',
|
|
1021
|
+
},
|
|
1013
1022
|
title: 'Settings',
|
|
1014
1023
|
button_logout: 'Log out',
|
|
1015
1024
|
empty_screen: {
|
|
@@ -1057,6 +1066,15 @@ const translation = {
|
|
|
1057
1066
|
mfa_button: 'Authenticator App',
|
|
1058
1067
|
title: '2 factor authentication',
|
|
1059
1068
|
},
|
|
1069
|
+
mfa_section: {
|
|
1070
|
+
title: 'MFA',
|
|
1071
|
+
passkey_button: 'Passkeys',
|
|
1072
|
+
totp_button: 'TOTP',
|
|
1073
|
+
},
|
|
1074
|
+
wallet_security_section: {
|
|
1075
|
+
title: 'Wallet Security',
|
|
1076
|
+
passkey_button: 'Passkeys',
|
|
1077
|
+
},
|
|
1060
1078
|
title: 'Settings',
|
|
1061
1079
|
button_logout: 'Log out',
|
|
1062
1080
|
account_security: {
|
|
@@ -2766,6 +2784,16 @@ const translation = {
|
|
|
2766
2784
|
connection_proposal_expired: 'Connection proposal expired. Please try again.',
|
|
2767
2785
|
sei_not_enabled_in_keplr_wallet: 'Sei network is not enabled in Keplr. Please enable it and try again.',
|
|
2768
2786
|
},
|
|
2787
|
+
/**
|
|
2788
|
+
* @description copy keys for search component
|
|
2789
|
+
* @default
|
|
2790
|
+
* {
|
|
2791
|
+
clear: 'Clear',
|
|
2792
|
+
}
|
|
2793
|
+
*/
|
|
2794
|
+
dyn_search: {
|
|
2795
|
+
clear: 'Clear',
|
|
2796
|
+
},
|
|
2769
2797
|
};
|
|
2770
2798
|
|
|
2771
2799
|
exports.translation = translation;
|
|
@@ -1004,6 +1004,15 @@ export declare const translation: {
|
|
|
1004
1004
|
mfa_button: 'Authenticator App',
|
|
1005
1005
|
title: '2 factor authentication',
|
|
1006
1006
|
},
|
|
1007
|
+
mfa_section: {
|
|
1008
|
+
title: 'MFA',
|
|
1009
|
+
passkey_button: 'Passkeys',
|
|
1010
|
+
totp_button: 'TOTP',
|
|
1011
|
+
},
|
|
1012
|
+
wallet_security_section: {
|
|
1013
|
+
title: 'Wallet Security',
|
|
1014
|
+
passkey_button: 'Passkeys',
|
|
1015
|
+
},
|
|
1007
1016
|
title: 'Settings',
|
|
1008
1017
|
button_logout: 'Log out',
|
|
1009
1018
|
empty_screen: {
|
|
@@ -1053,6 +1062,15 @@ export declare const translation: {
|
|
|
1053
1062
|
mfa_button: string;
|
|
1054
1063
|
title: string;
|
|
1055
1064
|
};
|
|
1065
|
+
mfa_section: {
|
|
1066
|
+
title: string;
|
|
1067
|
+
passkey_button: string;
|
|
1068
|
+
totp_button: string;
|
|
1069
|
+
};
|
|
1070
|
+
wallet_security_section: {
|
|
1071
|
+
title: string;
|
|
1072
|
+
passkey_button: string;
|
|
1073
|
+
};
|
|
1056
1074
|
title: string;
|
|
1057
1075
|
button_logout: string;
|
|
1058
1076
|
account_security: {
|
|
@@ -2762,4 +2780,14 @@ export declare const translation: {
|
|
|
2762
2780
|
connection_proposal_expired: string;
|
|
2763
2781
|
sei_not_enabled_in_keplr_wallet: string;
|
|
2764
2782
|
};
|
|
2783
|
+
/**
|
|
2784
|
+
* @description copy keys for search component
|
|
2785
|
+
* @default
|
|
2786
|
+
* {
|
|
2787
|
+
clear: 'Clear',
|
|
2788
|
+
}
|
|
2789
|
+
*/
|
|
2790
|
+
dyn_search: {
|
|
2791
|
+
clear: string;
|
|
2792
|
+
};
|
|
2765
2793
|
};
|