@dynamic-labs/sdk-react-core 4.22.8 → 4.23.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.
Files changed (164) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +13 -13
  5. package/src/index.cjs +2 -1
  6. package/src/index.d.ts +1 -0
  7. package/src/index.js +1 -1
  8. package/src/lib/client/client.cjs +2 -0
  9. package/src/lib/client/client.d.ts +1 -0
  10. package/src/lib/client/client.js +2 -1
  11. package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.cjs +5 -1
  12. package/src/lib/client/extension/hooks/useInitializeSdkClient/fetchOverride/fetchOverride.js +5 -1
  13. package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.cjs +24 -6
  14. package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.d.ts +1 -1
  15. package/src/lib/client/extension/hooks/useInitializeSdkClient/useInitializeSdkClient.js +26 -8
  16. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.cjs +1 -1
  17. package/src/lib/components/MenuList/DropdownMenu/DropdownMenu.js +1 -1
  18. package/src/lib/components/Search/Search.cjs +5 -1
  19. package/src/lib/components/Search/Search.js +5 -1
  20. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +1 -1
  21. package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +1 -1
  22. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +1 -1
  23. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +1 -1
  24. package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +9 -2
  25. package/src/lib/events/dynamicEvents.cjs +1 -0
  26. package/src/lib/events/dynamicEvents.d.ts +2 -2
  27. package/src/lib/events/dynamicEvents.js +1 -0
  28. package/src/lib/events/wallets.d.ts +2 -0
  29. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -1
  30. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -1
  31. package/src/lib/locale/en/translation.cjs +30 -0
  32. package/src/lib/locale/en/translation.d.ts +30 -0
  33. package/src/lib/locale/en/translation.js +30 -0
  34. package/src/lib/shared/logger.cjs +1 -1
  35. package/src/lib/shared/logger.js +2 -2
  36. package/src/lib/styles/index.shadow.cjs +1 -1
  37. package/src/lib/styles/index.shadow.js +1 -1
  38. package/src/lib/utils/functions/getSessionInformation/getSessionInformation.cjs +1 -1
  39. package/src/lib/utils/functions/getSessionInformation/getSessionInformation.js +1 -1
  40. package/src/lib/utils/functions/getTimeSince/index.d.ts +1 -0
  41. package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs +1 -1
  42. package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js +1 -1
  43. package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.cjs +1 -1
  44. package/src/lib/utils/hooks/authenticationHooks/helpers/isConnectOnly.js +1 -1
  45. package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +1 -1
  46. package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +1 -1
  47. package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +1 -1
  48. package/src/lib/utils/hooks/index.d.ts +3 -0
  49. package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.cjs +1 -1
  50. package/src/lib/utils/hooks/useAuthLayoutChecks/useAllowClose/useAllowClose.js +1 -1
  51. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -1
  52. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -1
  53. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +1 -1
  54. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +1 -1
  55. package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.cjs +15 -0
  56. package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.d.ts +6 -0
  57. package/src/lib/utils/hooks/useConnectWallet/HandleConnectWalletRejectionError.js +11 -0
  58. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +13 -6
  59. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -2
  60. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +13 -6
  61. package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.cjs +1 -1
  62. package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.js +1 -1
  63. package/src/lib/utils/hooks/useIsMfaEnabled/index.d.ts +1 -0
  64. package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.cjs +15 -0
  65. package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.d.ts +1 -0
  66. package/src/lib/utils/hooks/useIsMfaEnabled/useIsMfaEnabled.js +11 -0
  67. package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/index.d.ts +1 -0
  68. package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.cjs +15 -0
  69. package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.d.ts +1 -0
  70. package/src/lib/utils/hooks/useIsPasskeysMfaEnabled/useIsPasskeysMfaEnabled.js +11 -0
  71. package/src/lib/utils/hooks/useIsTotpMfaEnabled/index.d.ts +1 -0
  72. package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.cjs +15 -0
  73. package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.d.ts +1 -0
  74. package/src/lib/utils/hooks/useIsTotpMfaEnabled/useIsTotpMfaEnabled.js +11 -0
  75. package/src/lib/utils/hooks/useMfa/useMfa.cjs +1 -1
  76. package/src/lib/utils/hooks/useMfa/useMfa.js +1 -1
  77. package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +33 -18
  78. package/src/lib/utils/hooks/useMfaModals/useMfaModals.d.ts +4 -0
  79. package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +33 -18
  80. package/src/lib/utils/hooks/useRefreshUserState/useRefreshUserState.cjs +1 -1
  81. package/src/lib/utils/hooks/useRefreshUserState/useRefreshUserState.js +1 -1
  82. package/src/lib/utils/hooks/useRegisterPasskey/useRegisterPasskey.d.ts +2 -2
  83. package/src/lib/utils/hooks/useSubmitExchangeFunding/useSubmitExchangeFunding.cjs +11 -2
  84. package/src/lib/utils/hooks/useSubmitExchangeFunding/useSubmitExchangeFunding.js +11 -2
  85. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +1 -1
  86. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +1 -1
  87. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +1 -1
  88. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +1 -1
  89. package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.cjs +1 -1
  90. package/src/lib/utils/hooks/useValidateSession/handleWalletInfoOutOfSync/handleWalletInfoOutOfSync.js +1 -1
  91. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +1 -1
  92. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +1 -1
  93. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +43 -6
  94. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.d.ts +2 -1
  95. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +43 -6
  96. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -1
  97. package/src/lib/views/EmailVerification/EmailVerification.js +1 -1
  98. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +17 -8
  99. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.d.ts +1 -1
  100. package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +17 -8
  101. package/src/lib/views/EmbeddedReveal/utils/waasExport/waasExport.cjs +8 -2
  102. package/src/lib/views/EmbeddedReveal/utils/waasExport/waasExport.js +8 -2
  103. package/src/lib/views/ExchangeList/ExchangeList.cjs +9 -14
  104. package/src/lib/views/ExchangeList/ExchangeList.js +10 -15
  105. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +2 -2
  106. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +2 -2
  107. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +1 -1
  108. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +1 -1
  109. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +4 -2
  110. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +2 -2
  111. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +4 -2
  112. package/src/lib/views/WalletList/WalletList.cjs +1 -1
  113. package/src/lib/views/WalletList/WalletList.js +1 -1
  114. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +3 -3
  115. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +2 -2
  116. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +3 -3
  117. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -4
  118. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -4
  119. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
  120. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
  121. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -2
  122. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +2 -2
  123. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -2
  124. package/src/lib/widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.cjs +0 -6
  125. package/src/lib/widgets/DynamicWidget/helpers/convertExchangeKeyAndProviderEnum.js +1 -6
  126. package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +0 -1
  127. package/src/lib/widgets/DynamicWidget/helpers/helpers.d.ts +0 -1
  128. package/src/lib/widgets/DynamicWidget/helpers/helpers.js +0 -1
  129. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
  130. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
  131. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs +42 -106
  132. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js +43 -107
  133. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.cjs +119 -0
  134. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.d.ts +6 -0
  135. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/MfaSection.js +115 -0
  136. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/MfaSection/index.d.ts +1 -0
  137. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.cjs +170 -0
  138. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.d.ts +7 -0
  139. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/WalletSecuritySection.js +166 -0
  140. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/WalletSecuritySection/index.d.ts +1 -0
  141. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.cjs +1 -1
  142. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExchangeFunding/useStartExchangeFunding.js +1 -1
  143. package/src/lib/widgets/DynamicWidget/views/DepositedExchangeView/DepositedExchangeView.cjs +2 -2
  144. package/src/lib/widgets/DynamicWidget/views/DepositedExchangeView/DepositedExchangeView.js +2 -2
  145. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
  146. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
  147. package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView/ManageMfaWidgetView.cjs → ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.cjs} +8 -7
  148. package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.d.ts +2 -0
  149. package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView/ManageMfaWidgetView.js → ManageTotpMfaWidgetView/ManageTotpMfaWidgetView.js} +7 -6
  150. package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.cjs +3 -3
  151. package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.js +3 -3
  152. package/src/lib/widgets/DynamicWidget/views/ManageTotpMfaWidgetView/index.d.ts +1 -0
  153. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +5 -4
  154. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +5 -4
  155. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.d.ts +0 -2
  156. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/index.d.ts +0 -1
  157. /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.cjs +0 -0
  158. /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.d.ts +0 -0
  159. /package/src/lib/{widgets/DynamicWidget/helpers → utils/functions/getTimeSince}/getTimeSince.js +0 -0
  160. /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/UserDeviceTile.d.ts +0 -0
  161. /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/index.d.ts +0 -0
  162. /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.cjs +0 -0
  163. /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.d.ts +0 -0
  164. /package/src/lib/widgets/DynamicWidget/views/{ManageMfaWidgetView → ManageTotpMfaWidgetView}/components/utils/sort.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ### [4.23.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.23.0...v4.23.1) (2025-07-15)
3
+
4
+ ## [4.23.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.8...v4.23.0) (2025-07-11)
5
+
6
+
7
+ ### Features
8
+
9
+ * 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))
10
+ * add walletConnectionFailed event ([#9152](https://github.com/dynamic-labs/dynamic-auth/issues/9152)) ([ebdd06f](https://github.com/dynamic-labs/dynamic-auth/commit/ebdd06f6b799867db35f784d84a345f8f91fedb1))
11
+ * 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))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * 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))
17
+
2
18
  ### [4.22.8](https://github.com/dynamic-labs/dynamic-auth/compare/v4.22.7...v4.22.8) (2025-07-10)
3
19
 
4
20
 
package/package.cjs CHANGED
@@ -3,10 +3,10 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.22.8";
6
+ var version = "4.23.1";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.0.706",
9
- "@dynamic-labs-sdk/client": "0.0.1-alpha.13",
8
+ "@dynamic-labs/sdk-api-core": "0.0.715",
9
+ "@dynamic-labs-sdk/client": "0.0.1-alpha.15",
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.22.8";
2
+ var version = "4.23.1";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.0.706",
5
- "@dynamic-labs-sdk/client": "0.0.1-alpha.13",
4
+ "@dynamic-labs/sdk-api-core": "0.0.715",
5
+ "@dynamic-labs-sdk/client": "0.0.1-alpha.15",
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.22.8",
3
+ "version": "4.23.1",
4
4
  "dependencies": {
5
- "@dynamic-labs/sdk-api-core": "0.0.706",
6
- "@dynamic-labs-sdk/client": "0.0.1-alpha.13",
5
+ "@dynamic-labs/sdk-api-core": "0.0.715",
6
+ "@dynamic-labs-sdk/client": "0.0.1-alpha.15",
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.22.8",
19
- "@dynamic-labs/iconic": "4.22.8",
20
- "@dynamic-labs/logger": "4.22.8",
21
- "@dynamic-labs/multi-wallet": "4.22.8",
22
- "@dynamic-labs/rpc-providers": "4.22.8",
23
- "@dynamic-labs/store": "4.22.8",
24
- "@dynamic-labs/types": "4.22.8",
25
- "@dynamic-labs/utils": "4.22.8",
26
- "@dynamic-labs/wallet-book": "4.22.8",
27
- "@dynamic-labs/wallet-connector-core": "4.22.8",
18
+ "@dynamic-labs/assert-package-version": "4.23.1",
19
+ "@dynamic-labs/iconic": "4.23.1",
20
+ "@dynamic-labs/logger": "4.23.1",
21
+ "@dynamic-labs/multi-wallet": "4.23.1",
22
+ "@dynamic-labs/rpc-providers": "4.23.1",
23
+ "@dynamic-labs/store": "4.23.1",
24
+ "@dynamic-labs/types": "4.23.1",
25
+ "@dynamic-labs/utils": "4.23.1",
26
+ "@dynamic-labs/wallet-book": "4.23.1",
27
+ "@dynamic-labs/wallet-connector-core": "4.23.1",
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
- import './lib/client/client.js';
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.
@@ -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 };
@@ -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
- return window.fetch(req, init);
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;
@@ -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
- return window.fetch(req, init);
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
- const newClient = client.createDynamicClient({
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
- const newClient = createDynamicClient({
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, }) => (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', children: "Clear" }))] }));
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, }) => (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', children: "Clear" }))] }));
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;
@@ -35,6 +35,7 @@ const externalEvents = [
35
35
  'userWalletsChanged',
36
36
  'walletConnectedForFunding',
37
37
  'walletTabSelected',
38
+ 'walletConnectionFailed',
38
39
  ];
39
40
  // Full internal event emitter
40
41
  const dynamicEvents = new EventEmitter__default["default"]();
@@ -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;
@@ -27,6 +27,7 @@ const externalEvents = [
27
27
  'userWalletsChanged',
28
28
  'walletConnectedForFunding',
29
29
  'walletTabSelected',
30
+ 'walletConnectionFailed',
30
31
  ];
31
32
  // Full internal event emitter
32
33
  const dynamicEvents = new EventEmitter();
@@ -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();
@@ -543,6 +543,8 @@ const translation = {
543
543
  mfa_failed: 'Incorrect security code. Please double-check your MFA code and try again.',
544
544
  invalid_currency_description: 'Please choose a supported currency and try again.',
545
545
  invalid_balance: 'This transfer, including fees, exceeds your available balance. Transfer a smaller amount.',
546
+ amount_too_small: 'The amount you’re trying to transfer is below the minimum allowed by the selected exchange. Please enter a larger amount and try again.',
547
+ address_not_whitelisted: 'The destination address is not whitelisted on this exchange. Please add it to your whitelist before retrying the transfer.',
546
548
  unknown: 'An unknown error occurred.',
547
549
  },
548
550
  /**
@@ -1010,6 +1012,15 @@ const translation = {
1010
1012
  mfa_button: 'Authenticator App',
1011
1013
  title: '2 factor authentication',
1012
1014
  },
1015
+ mfa_section: {
1016
+ title: 'MFA',
1017
+ passkey_button: 'Passkeys',
1018
+ totp_button: 'TOTP',
1019
+ },
1020
+ wallet_security_section: {
1021
+ title: 'Wallet Security',
1022
+ passkey_button: 'Passkeys',
1023
+ },
1013
1024
  title: 'Settings',
1014
1025
  button_logout: 'Log out',
1015
1026
  empty_screen: {
@@ -1057,6 +1068,15 @@ const translation = {
1057
1068
  mfa_button: 'Authenticator App',
1058
1069
  title: '2 factor authentication',
1059
1070
  },
1071
+ mfa_section: {
1072
+ title: 'MFA',
1073
+ passkey_button: 'Passkeys',
1074
+ totp_button: 'TOTP',
1075
+ },
1076
+ wallet_security_section: {
1077
+ title: 'Wallet Security',
1078
+ passkey_button: 'Passkeys',
1079
+ },
1060
1080
  title: 'Settings',
1061
1081
  button_logout: 'Log out',
1062
1082
  account_security: {
@@ -2766,6 +2786,16 @@ const translation = {
2766
2786
  connection_proposal_expired: 'Connection proposal expired. Please try again.',
2767
2787
  sei_not_enabled_in_keplr_wallet: 'Sei network is not enabled in Keplr. Please enable it and try again.',
2768
2788
  },
2789
+ /**
2790
+ * @description copy keys for search component
2791
+ * @default
2792
+ * {
2793
+ clear: 'Clear',
2794
+ }
2795
+ */
2796
+ dyn_search: {
2797
+ clear: 'Clear',
2798
+ },
2769
2799
  };
2770
2800
 
2771
2801
  exports.translation = translation;
@@ -537,6 +537,8 @@ export declare const translation: {
537
537
  mfa_failed: string;
538
538
  invalid_currency_description: string;
539
539
  invalid_balance: string;
540
+ amount_too_small: string;
541
+ address_not_whitelisted: string;
540
542
  unknown: string;
541
543
  };
542
544
  /**
@@ -1004,6 +1006,15 @@ export declare const translation: {
1004
1006
  mfa_button: 'Authenticator App',
1005
1007
  title: '2 factor authentication',
1006
1008
  },
1009
+ mfa_section: {
1010
+ title: 'MFA',
1011
+ passkey_button: 'Passkeys',
1012
+ totp_button: 'TOTP',
1013
+ },
1014
+ wallet_security_section: {
1015
+ title: 'Wallet Security',
1016
+ passkey_button: 'Passkeys',
1017
+ },
1007
1018
  title: 'Settings',
1008
1019
  button_logout: 'Log out',
1009
1020
  empty_screen: {
@@ -1053,6 +1064,15 @@ export declare const translation: {
1053
1064
  mfa_button: string;
1054
1065
  title: string;
1055
1066
  };
1067
+ mfa_section: {
1068
+ title: string;
1069
+ passkey_button: string;
1070
+ totp_button: string;
1071
+ };
1072
+ wallet_security_section: {
1073
+ title: string;
1074
+ passkey_button: string;
1075
+ };
1056
1076
  title: string;
1057
1077
  button_logout: string;
1058
1078
  account_security: {
@@ -2762,4 +2782,14 @@ export declare const translation: {
2762
2782
  connection_proposal_expired: string;
2763
2783
  sei_not_enabled_in_keplr_wallet: string;
2764
2784
  };
2785
+ /**
2786
+ * @description copy keys for search component
2787
+ * @default
2788
+ * {
2789
+ clear: 'Clear',
2790
+ }
2791
+ */
2792
+ dyn_search: {
2793
+ clear: string;
2794
+ };
2765
2795
  };