@dynamic-labs/sdk-react-core 1.0.1 → 1.0.3

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 (208) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +13 -13
  5. package/src/lib/components/Alert/Alert.types.d.ts +2 -1
  6. package/src/lib/components/Button/Button.cjs +2 -2
  7. package/src/lib/components/Button/Button.d.ts +2 -1
  8. package/src/lib/components/Button/Button.js +2 -2
  9. package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
  10. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
  11. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
  12. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
  13. package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
  14. package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
  15. package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
  16. package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
  17. package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
  18. package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
  19. package/src/lib/components/Input/Input.types.d.ts +2 -1
  20. package/src/lib/components/ListTile/ListTile.cjs +1 -1
  21. package/src/lib/components/ListTile/ListTile.js +1 -1
  22. package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
  23. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
  24. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
  25. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
  26. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -3
  27. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -3
  28. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
  29. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
  30. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -6
  31. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
  32. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -6
  33. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
  34. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
  35. package/src/lib/components/Search/Search.cjs +1 -1
  36. package/src/lib/components/Search/Search.d.ts +2 -1
  37. package/src/lib/components/Search/Search.js +1 -1
  38. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
  39. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
  40. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
  41. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
  42. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
  43. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
  44. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
  45. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
  46. package/src/lib/components/TextButton/TextButton.d.ts +2 -1
  47. package/src/lib/components/Tooltip/Tooltip.cjs +2 -2
  48. package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
  49. package/src/lib/components/Tooltip/Tooltip.js +2 -2
  50. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
  51. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
  52. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
  53. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
  54. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
  55. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
  56. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  57. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  58. package/src/lib/components/Typography/Typography.types.d.ts +2 -1
  59. package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
  60. package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
  61. package/src/lib/components/UserProfile/UserProfile.js +2 -2
  62. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -2
  63. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
  64. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -2
  65. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
  66. package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
  67. package/src/lib/data/api.cjs +0 -13
  68. package/src/lib/data/api.d.ts +1 -2
  69. package/src/lib/data/api.js +1 -13
  70. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
  71. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
  72. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -2
  73. package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
  74. package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -2
  75. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
  76. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
  77. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
  78. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
  79. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +2 -2
  80. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
  81. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +2 -2
  82. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +2 -2
  83. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
  84. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +2 -2
  85. package/src/lib/locale/en/translation.cjs +124 -1
  86. package/src/lib/locale/en/translation.d.ts +124 -1
  87. package/src/lib/locale/en/translation.js +124 -1
  88. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -1
  89. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -1
  90. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -2
  91. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -2
  92. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
  93. package/src/lib/shared/types/index.d.ts +3 -0
  94. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +5 -3
  95. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +5 -3
  96. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +28 -1
  97. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +28 -1
  98. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -0
  99. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
  100. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -0
  101. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
  102. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
  103. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
  104. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +3 -0
  105. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +3 -0
  106. package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
  107. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
  108. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
  109. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
  110. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +20 -14
  111. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +20 -14
  112. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +26 -4
  113. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +26 -4
  114. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
  115. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
  116. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
  117. package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
  118. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
  119. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
  120. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
  121. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
  122. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
  123. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
  124. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -4
  125. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -4
  126. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +9 -8
  127. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +9 -8
  128. package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
  129. package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
  130. package/src/lib/views/CollectUserDataView/useFields.js +11 -0
  131. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -3
  132. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -3
  133. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
  134. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
  135. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -2
  136. package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -2
  137. package/src/lib/views/EmailVerification/EmailVerification.cjs +35 -24
  138. package/src/lib/views/EmailVerification/EmailVerification.js +35 -24
  139. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
  140. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
  141. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +2 -2
  142. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
  143. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +2 -2
  144. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
  145. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
  146. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
  147. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
  148. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
  149. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
  150. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -2
  151. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -2
  152. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -1
  153. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -1
  154. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  155. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  156. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
  157. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
  158. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
  159. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
  160. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +3 -3
  161. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +3 -3
  162. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
  163. package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
  164. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
  165. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
  166. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
  167. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
  168. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
  169. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
  170. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
  171. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
  172. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
  173. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
  174. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
  175. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +8 -6
  176. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
  177. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +8 -6
  178. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  179. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  180. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
  181. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
  182. package/src/lib/views/WalletList/WalletList.cjs +6 -9
  183. package/src/lib/views/WalletList/WalletList.js +6 -9
  184. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
  185. package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
  186. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
  187. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
  188. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  189. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  190. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
  191. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
  192. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
  193. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
  194. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
  195. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
  196. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -2
  197. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
  198. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -2
  199. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -1
  200. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -1
  201. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
  202. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
  203. package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
  204. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
  205. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
  206. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
  207. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
  208. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
@@ -27,6 +27,8 @@ var useEffectOnce = require('../../shared/utils/hooks/useEffectOnce/useEffectOnc
27
27
  require('../../shared/consts/index.cjs');
28
28
  require('@dynamic-labs/multi-wallet');
29
29
  require('@dynamic-labs/sdk-api');
30
+ var isTurnkeyEnabled = require('../../utils/functions/isTurnkeyEnabled/isTurnkeyEnabled.cjs');
31
+ var index = require('../../utils/functions/storeAuthToken/index.cjs');
30
32
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
31
33
  var AccountExistsContext = require('../../context/AccountExistsContext/AccountExistsContext.cjs');
32
34
  var api = require('../../data/api.cjs');
@@ -100,6 +102,7 @@ const EmailVerification = () => {
100
102
  const { loading, setLoading } = LoadingContext.useLoadingContext();
101
103
  const { t } = reactI18next.useTranslation();
102
104
  const { createEmbeddedWallet } = useEmbeddedWallet.useEmbeddedWallet();
105
+ const isTurnkeyProviderEnabled = isTurnkeyEnabled.isTurnkeyEnabled(projectSettings);
103
106
  const { remainingSeconds, startCountdown } = useCountdown.useCountdown({
104
107
  callback: () => setRetried(false),
105
108
  seconds: SECONDS_TO_RETRY,
@@ -132,7 +135,7 @@ const EmailVerification = () => {
132
135
  return;
133
136
  }
134
137
  try {
135
- const { nextView } = yield verifyEmail(verificationToken, verificationUUID);
138
+ const { nextView, jwt } = yield verifyEmail(verificationToken, verificationUUID);
136
139
  if (onboardingOnlyJwt) {
137
140
  setOnboardingOnlyJwt(undefined);
138
141
  setCallback('authSuccess');
@@ -141,18 +144,20 @@ const EmailVerification = () => {
141
144
  if (nextView === 'verified-and-transferred') {
142
145
  setShowTransferMessage(true);
143
146
  }
144
- if (!((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.automaticEmbeddedWalletCreation)) {
145
- setShowAuthFlow(false);
147
+ if (isTurnkeyProviderEnabled &&
148
+ ((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.automaticEmbeddedWalletCreation)) {
149
+ try {
150
+ index.storeAuthToken(jwt);
151
+ // this function will check turnkey wallet enabled and create wallet if needed
152
+ // if not enabled, it will throw an error.
153
+ yield createEmbeddedWallet();
154
+ }
155
+ catch (e) {
156
+ setShowAuthFlow(false);
157
+ }
146
158
  return;
147
159
  }
148
- try {
149
- // this function will check turnkey wallet enabled and create wallet if needed
150
- // if not enabled, it will throw an error.
151
- yield createEmbeddedWallet();
152
- }
153
- catch (e) {
154
- setShowAuthFlow(false);
155
- }
160
+ setShowAuthFlow(false);
156
161
  }
157
162
  catch (error) {
158
163
  logger.logger.debug(error);
@@ -180,8 +185,8 @@ const EmailVerification = () => {
180
185
  (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation,
181
186
  createEmbeddedWallet,
182
187
  setShowAuthFlow,
183
- setErrorMessage,
184
188
  setView,
189
+ isTurnkeyProviderEnabled,
185
190
  ]);
186
191
  const handleEmailLogin = React.useCallback((verificationToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
187
192
  var _d;
@@ -214,19 +219,24 @@ const EmailVerification = () => {
214
219
  setCallback('authSuccess');
215
220
  // this timeout is set to make sure that the user will see success message
216
221
  yield sleepToShowSuccessMessage();
217
- yield createUserProfileByJWT(jwt);
218
- if (!((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.automaticEmbeddedWalletCreation)) {
219
- setShowAuthFlow(false);
222
+ if (isTurnkeyProviderEnabled &&
223
+ ((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.automaticEmbeddedWalletCreation)) {
224
+ try {
225
+ // Store the auth token in local storage so it can be used during embedded wallet creation
226
+ index.storeAuthToken(jwt);
227
+ // this function will check turnkey wallet enabled and create wallet if needed
228
+ // if not enabled, it will throw an error.
229
+ yield createEmbeddedWallet();
230
+ }
231
+ catch (e) {
232
+ yield createUserProfileByJWT(jwt);
233
+ setShowAuthFlow(false);
234
+ }
220
235
  return;
221
236
  }
222
- try {
223
- // this function will check turnkey wallet enabled and create wallet if needed
224
- // if not enabled, it will throw an error.
225
- yield createEmbeddedWallet();
226
- }
227
- catch (e) {
228
- setShowAuthFlow(false);
229
- }
237
+ // If not creating embedded wallet automatically, create user profile
238
+ yield createUserProfileByJWT(jwt);
239
+ setShowAuthFlow(false);
230
240
  }
231
241
  catch (error) {
232
242
  if (error instanceof utils.NoAccessError) {
@@ -258,6 +268,7 @@ const EmailVerification = () => {
258
268
  setShowAuthFlow,
259
269
  setErrorMessage,
260
270
  setExistentAccountData,
271
+ isTurnkeyProviderEnabled,
261
272
  ]);
262
273
  const handleRetry = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
263
274
  try {
@@ -300,7 +311,7 @@ const EmailVerification = () => {
300
311
  }, []);
301
312
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, className: 'email-verification__error-message', children: error })), jsxRuntime.jsxs("div", { className: classNames.classNames('email-verification__container', {
302
313
  'email-verification__container--error': Boolean(error),
303
- }), children: [showTransferMessage && (jsxRuntime.jsx("div", { className: 'email-verification__transfer-message', children: t('dyn_email_verification.complete') })), isValidated ? (jsxRuntime.jsx("div", { className: 'email-verification__icon-container', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 64, InnerIcon: check.ReactComponent }) })) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: true, className: 'email-verification__icon-with-spinner' })), jsxRuntime.jsxs("div", { className: 'email-verification__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_email_verification.description') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) })] }), !isLoginView && !isValidated && (jsxRuntime.jsx(TextButton.TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, children: t('dyn_email_verification.edit_email') })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'email-verification__retry-text', children: t('dyn_email_verification.resend_code_in', { remainingSeconds }) }), jsxRuntime.jsxs("span", { className: 'email-verification__retry-container', children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', children: t('dyn_email_verification.code_sent') })] })] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { className: 'email-verification__retry-copy', variant: 'body_small', weight: 'medium', color: 'secondary', children: t('dyn_email_verification.code_not_received') }), jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), children: t('dyn_email_verification.resend_code') })] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, children: t('dyn_email_verification.log_out_button') }))] })] }));
314
+ }), children: [showTransferMessage && (jsxRuntime.jsx("div", { className: 'email-verification__transfer-message', copykey: 'dyn_email_verification.complete', children: t('dyn_email_verification.complete') })), isValidated ? (jsxRuntime.jsx("div", { className: 'email-verification__icon-container', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 64, InnerIcon: check.ReactComponent }) })) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: true, className: 'email-verification__icon-with-spinner' })), jsxRuntime.jsxs("div", { className: 'email-verification__copy-text-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_verification.description', children: t('dyn_email_verification.description') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail.shortenEmail(email) })] }), !isLoginView && !isValidated && (jsxRuntime.jsx(TextButton.TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, copykey: 'dyn_email_verification.edit_email', children: t('dyn_email_verification.edit_email') })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'email-verification__retry-text', copykey: 'dyn_email_verification.resend_code_in', children: t('dyn_email_verification.resend_code_in', { remainingSeconds }) }), jsxRuntime.jsxs("span", { className: 'email-verification__retry-container', children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', copykey: 'dyn_email_verification.code_sent', children: t('dyn_email_verification.code_sent') })] })] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { className: 'email-verification__retry-copy', variant: 'body_small', weight: 'medium', color: 'secondary', copykey: 'dyn_email_verification.code_not_received', children: t('dyn_email_verification.code_not_received') }), jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), copykey: 'dyn_email_verification.resend_code', children: t('dyn_email_verification.resend_code') })] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, copykey: 'dyn_email_verification.log_out_button', children: t('dyn_email_verification.log_out_button') }))] })] }));
304
315
  };
305
316
 
306
317
  exports.EmailVerification = EmailVerification;
@@ -23,6 +23,8 @@ import { useEffectOnce } from '../../shared/utils/hooks/useEffectOnce/useEffectO
23
23
  import '../../shared/consts/index.js';
24
24
  import '@dynamic-labs/multi-wallet';
25
25
  import '@dynamic-labs/sdk-api';
26
+ import { isTurnkeyEnabled } from '../../utils/functions/isTurnkeyEnabled/isTurnkeyEnabled.js';
27
+ import { storeAuthToken } from '../../utils/functions/storeAuthToken/index.js';
26
28
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
27
29
  import { useAccountExistsContext } from '../../context/AccountExistsContext/AccountExistsContext.js';
28
30
  import { signInWithEmailVerification, retryEmailVerification } from '../../data/api.js';
@@ -96,6 +98,7 @@ const EmailVerification = () => {
96
98
  const { loading, setLoading } = useLoadingContext();
97
99
  const { t } = useTranslation();
98
100
  const { createEmbeddedWallet } = useEmbeddedWallet();
101
+ const isTurnkeyProviderEnabled = isTurnkeyEnabled(projectSettings);
99
102
  const { remainingSeconds, startCountdown } = useCountdown({
100
103
  callback: () => setRetried(false),
101
104
  seconds: SECONDS_TO_RETRY,
@@ -128,7 +131,7 @@ const EmailVerification = () => {
128
131
  return;
129
132
  }
130
133
  try {
131
- const { nextView } = yield verifyEmail(verificationToken, verificationUUID);
134
+ const { nextView, jwt } = yield verifyEmail(verificationToken, verificationUUID);
132
135
  if (onboardingOnlyJwt) {
133
136
  setOnboardingOnlyJwt(undefined);
134
137
  setCallback('authSuccess');
@@ -137,18 +140,20 @@ const EmailVerification = () => {
137
140
  if (nextView === 'verified-and-transferred') {
138
141
  setShowTransferMessage(true);
139
142
  }
140
- if (!((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.automaticEmbeddedWalletCreation)) {
141
- setShowAuthFlow(false);
143
+ if (isTurnkeyProviderEnabled &&
144
+ ((_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.automaticEmbeddedWalletCreation)) {
145
+ try {
146
+ storeAuthToken(jwt);
147
+ // this function will check turnkey wallet enabled and create wallet if needed
148
+ // if not enabled, it will throw an error.
149
+ yield createEmbeddedWallet();
150
+ }
151
+ catch (e) {
152
+ setShowAuthFlow(false);
153
+ }
142
154
  return;
143
155
  }
144
- try {
145
- // this function will check turnkey wallet enabled and create wallet if needed
146
- // if not enabled, it will throw an error.
147
- yield createEmbeddedWallet();
148
- }
149
- catch (e) {
150
- setShowAuthFlow(false);
151
- }
156
+ setShowAuthFlow(false);
152
157
  }
153
158
  catch (error) {
154
159
  logger.debug(error);
@@ -176,8 +181,8 @@ const EmailVerification = () => {
176
181
  (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation,
177
182
  createEmbeddedWallet,
178
183
  setShowAuthFlow,
179
- setErrorMessage,
180
184
  setView,
185
+ isTurnkeyProviderEnabled,
181
186
  ]);
182
187
  const handleEmailLogin = useCallback((verificationToken) => __awaiter(void 0, void 0, void 0, function* () {
183
188
  var _d;
@@ -210,19 +215,24 @@ const EmailVerification = () => {
210
215
  setCallback('authSuccess');
211
216
  // this timeout is set to make sure that the user will see success message
212
217
  yield sleepToShowSuccessMessage();
213
- yield createUserProfileByJWT(jwt);
214
- if (!((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.automaticEmbeddedWalletCreation)) {
215
- setShowAuthFlow(false);
218
+ if (isTurnkeyProviderEnabled &&
219
+ ((_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.automaticEmbeddedWalletCreation)) {
220
+ try {
221
+ // Store the auth token in local storage so it can be used during embedded wallet creation
222
+ storeAuthToken(jwt);
223
+ // this function will check turnkey wallet enabled and create wallet if needed
224
+ // if not enabled, it will throw an error.
225
+ yield createEmbeddedWallet();
226
+ }
227
+ catch (e) {
228
+ yield createUserProfileByJWT(jwt);
229
+ setShowAuthFlow(false);
230
+ }
216
231
  return;
217
232
  }
218
- try {
219
- // this function will check turnkey wallet enabled and create wallet if needed
220
- // if not enabled, it will throw an error.
221
- yield createEmbeddedWallet();
222
- }
223
- catch (e) {
224
- setShowAuthFlow(false);
225
- }
233
+ // If not creating embedded wallet automatically, create user profile
234
+ yield createUserProfileByJWT(jwt);
235
+ setShowAuthFlow(false);
226
236
  }
227
237
  catch (error) {
228
238
  if (error instanceof NoAccessError) {
@@ -254,6 +264,7 @@ const EmailVerification = () => {
254
264
  setShowAuthFlow,
255
265
  setErrorMessage,
256
266
  setExistentAccountData,
267
+ isTurnkeyProviderEnabled,
257
268
  ]);
258
269
  const handleRetry = () => __awaiter(void 0, void 0, void 0, function* () {
259
270
  try {
@@ -296,7 +307,7 @@ const EmailVerification = () => {
296
307
  }, []);
297
308
  return (jsxs(Fragment, { children: [error && (jsx(ErrorContainer, { withIcon: false, className: 'email-verification__error-message', children: error })), jsxs("div", { className: classNames('email-verification__container', {
298
309
  'email-verification__container--error': Boolean(error),
299
- }), children: [showTransferMessage && (jsx("div", { className: 'email-verification__transfer-message', children: t('dyn_email_verification.complete') })), isValidated ? (jsx("div", { className: 'email-verification__icon-container', children: jsx(IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 64, InnerIcon: SvgCheck }) })) : (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: true, className: 'email-verification__icon-with-spinner' })), jsxs("div", { className: 'email-verification__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_email_verification.description') }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) })] }), !isLoginView && !isValidated && (jsx(TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, children: t('dyn_email_verification.edit_email') })), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'email-verification__retry-text', children: t('dyn_email_verification.resend_code_in', { remainingSeconds }) }), jsxs("span", { className: 'email-verification__retry-container', children: [jsx(SvgCheckCircle, {}), jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', children: t('dyn_email_verification.code_sent') })] })] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, { className: 'email-verification__retry-copy', variant: 'body_small', weight: 'medium', color: 'secondary', children: t('dyn_email_verification.code_not_received') }), jsx(TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), children: t('dyn_email_verification.resend_code') })] }))), !isLoginView && (jsx(TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, children: t('dyn_email_verification.log_out_button') }))] })] }));
310
+ }), children: [showTransferMessage && (jsx("div", { className: 'email-verification__transfer-message', copykey: 'dyn_email_verification.complete', children: t('dyn_email_verification.complete') })), isValidated ? (jsx("div", { className: 'email-verification__icon-container', children: jsx(IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: EmailIcon, iconSize: 64, InnerIcon: SvgCheck }) })) : (jsx(IconWithSpinner, { Icon: EmailIcon, iconSize: 96, isSpinning: true, className: 'email-verification__icon-with-spinner' })), jsxs("div", { className: 'email-verification__copy-text-container', children: [jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_email_verification.description', children: t('dyn_email_verification.description') }), jsx(Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', children: shortenEmail(email) })] }), !isLoginView && !isValidated && (jsx(TextButton, { onClick: updateEmail, className: 'email-verification__text-button', disabled: loading, copykey: 'dyn_email_verification.edit_email', children: t('dyn_email_verification.edit_email') })), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'email-verification__retry-text', copykey: 'dyn_email_verification.resend_code_in', children: t('dyn_email_verification.resend_code_in', { remainingSeconds }) }), jsxs("span", { className: 'email-verification__retry-container', children: [jsx(SvgCheckCircle, {}), jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text', copykey: 'dyn_email_verification.code_sent', children: t('dyn_email_verification.code_sent') })] })] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, { className: 'email-verification__retry-copy', variant: 'body_small', weight: 'medium', color: 'secondary', copykey: 'dyn_email_verification.code_not_received', children: t('dyn_email_verification.code_not_received') }), jsx(TextButton, { className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry(), copykey: 'dyn_email_verification.resend_code', children: t('dyn_email_verification.resend_code') })] }))), !isLoginView && (jsx(TextButton, { className: 'email-verification__log-out', onClick: handleLogOut, copykey: 'dyn_email_verification.log_out_button', children: t('dyn_email_verification.log_out_button') }))] })] }));
300
311
  };
301
312
 
302
313
  export { EmailVerification };
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var reactI18next = require('react-i18next');
8
7
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
8
  var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
10
9
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
@@ -29,6 +28,7 @@ var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
29
28
  require('../../context/ThemeContext/ThemeContext.cjs');
30
29
  require('@dynamic-labs/types');
31
30
  require('yup');
31
+ require('react-i18next');
32
32
  require('../../context/MockContext/MockContext.cjs');
33
33
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
34
34
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -63,7 +63,6 @@ require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/
63
63
  const EmailWalletOTPVerificationView = () => {
64
64
  const { setView } = ViewContext.useViewContext();
65
65
  const [error, setError] = React.useState();
66
- const { t } = reactI18next.useTranslation();
67
66
  const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext.useInternalDynamicContext();
68
67
  if (!emailWalletConnector ||
69
68
  !walletConnectorCore.isEmailOTPWalletConnector(emailWalletConnector)) {
@@ -81,7 +80,7 @@ const EmailWalletOTPVerificationView = () => {
81
80
  const { data: isValid, isLoading, mutate: onSubmit, } = useMutation.useMutation((otp) => emailWalletConnector.verifyOneTimePassword(otp), {
82
81
  onFailure: (error) => setError(error),
83
82
  });
84
- return (jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, successBannerText: t('dyn_otp_verification.banner_text') }));
83
+ return (jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, successBannerTextKey: 'dyn_otp_verification.banner_text' }));
85
84
  };
86
85
 
87
86
  exports.EmailWalletOTPVerificationView = EmailWalletOTPVerificationView;
@@ -1,6 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
- import { useTranslation } from 'react-i18next';
4
3
  import { isEmailOTPWalletConnector } from '@dynamic-labs/wallet-connector-core';
5
4
  import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
6
5
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
@@ -25,6 +24,7 @@ import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
25
24
  import '../../context/ThemeContext/ThemeContext.js';
26
25
  import '@dynamic-labs/types';
27
26
  import 'yup';
27
+ import 'react-i18next';
28
28
  import '../../context/MockContext/MockContext.js';
29
29
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
30
30
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -59,7 +59,6 @@ import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/P
59
59
  const EmailWalletOTPVerificationView = () => {
60
60
  const { setView } = useViewContext();
61
61
  const [error, setError] = useState();
62
- const { t } = useTranslation();
63
62
  const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext();
64
63
  if (!emailWalletConnector ||
65
64
  !isEmailOTPWalletConnector(emailWalletConnector)) {
@@ -77,7 +76,7 @@ const EmailWalletOTPVerificationView = () => {
77
76
  const { data: isValid, isLoading, mutate: onSubmit, } = useMutation((otp) => emailWalletConnector.verifyOneTimePassword(otp), {
78
77
  onFailure: (error) => setError(error),
79
78
  });
80
- return (jsx(OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, successBannerText: t('dyn_otp_verification.banner_text') }));
79
+ return (jsx(OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, successBannerTextKey: 'dyn_otp_verification.banner_text' }));
81
80
  };
82
81
 
83
82
  export { EmailWalletOTPVerificationView };
@@ -63,7 +63,7 @@ require('../../../../../components/Popper/Popper/Popper.cjs');
63
63
  require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
64
64
  require('react-focus-lock');
65
65
 
66
- const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) => {
66
+ const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, copykey, }) => {
67
67
  const numberOfWalletsText = React.useMemo(() => {
68
68
  if (numberOfWallets <= 10) {
69
69
  return numberOfWallets;
@@ -71,7 +71,7 @@ const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) =
71
71
  return `${Math.floor(numberOfWallets / 10) * 10}+`;
72
72
  }, [numberOfWallets]);
73
73
  const trailing = (jsxRuntime.jsxs("div", { className: 'list-item-button__trailing', children: [jsxRuntime.jsx("div", { className: classNames.classNames('list-item-button__trailing-child', 'list-item-button__trailing-label'), children: jsxRuntime.jsx(Badge.Badge, { text: `${numberOfWalletsText} available` }) }), jsxRuntime.jsx("div", { className: classNames.classNames('list-item-button__trailing-child', 'list-item-button__trailing-icon'), children: jsxRuntime.jsx(Icon.Icon, { color: 'text-primary', size: 'small', children: jsxRuntime.jsx(stroke.ReactComponent, {}) }) })] }));
74
- return (jsxRuntime.jsx(ListTile.ListTile, { trailing: trailing, onClick: onClick, className: 'list-item-button', disabled: disabled, children: text }));
74
+ return (jsxRuntime.jsx(ListTile.ListTile, { trailing: trailing, onClick: onClick, className: 'list-item-button', disabled: disabled, copykey: copykey, children: text }));
75
75
  };
76
76
 
77
77
  exports.ListItemButton = ListItemButton;
@@ -1,9 +1,10 @@
1
1
  /// <reference types="react" />
2
+ import { CopyKey } from '../../../../../shared';
2
3
  type Props = {
3
4
  numberOfWallets: number;
4
5
  onClick: VoidFunction;
5
6
  text: string;
6
7
  disabled?: boolean;
7
- };
8
- export declare const ListItemButton: ({ text, onClick, numberOfWallets, disabled, }: Props) => JSX.Element;
8
+ } & CopyKey;
9
+ export declare const ListItemButton: ({ text, onClick, numberOfWallets, disabled, copykey, }: Props) => JSX.Element;
9
10
  export {};
@@ -59,7 +59,7 @@ import '../../../../../components/Popper/Popper/Popper.js';
59
59
  import '../../../../../components/Popper/PopperContext/PopperContext.js';
60
60
  import 'react-focus-lock';
61
61
 
62
- const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) => {
62
+ const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, copykey, }) => {
63
63
  const numberOfWalletsText = useMemo(() => {
64
64
  if (numberOfWallets <= 10) {
65
65
  return numberOfWallets;
@@ -67,7 +67,7 @@ const ListItemButton = ({ text, onClick, numberOfWallets, disabled = false, }) =
67
67
  return `${Math.floor(numberOfWallets / 10) * 10}+`;
68
68
  }, [numberOfWallets]);
69
69
  const trailing = (jsxs("div", { className: 'list-item-button__trailing', children: [jsx("div", { className: classNames('list-item-button__trailing-child', 'list-item-button__trailing-label'), children: jsx(Badge, { text: `${numberOfWalletsText} available` }) }), jsx("div", { className: classNames('list-item-button__trailing-child', 'list-item-button__trailing-icon'), children: jsx(Icon, { color: 'text-primary', size: 'small', children: jsx(SvgStroke, {}) }) })] }));
70
- return (jsx(ListTile, { trailing: trailing, onClick: onClick, className: 'list-item-button', disabled: disabled, children: text }));
70
+ return (jsx(ListTile, { trailing: trailing, onClick: onClick, className: 'list-item-button', disabled: disabled, copykey: copykey, children: text }));
71
71
  };
72
72
 
73
73
  export { ListItemButton };
@@ -63,7 +63,7 @@ var WalletSimpleSignIn = require('./WalletSimpleSignIn/WalletSimpleSignIn.cjs');
63
63
 
64
64
  const WalletSignInSection = ({ numberOfItensToShow, isLoading, onSubmit, }) => {
65
65
  const { t } = reactI18next.useTranslation();
66
- return numberOfItensToShow > 0 ? (jsxRuntime.jsx(WalletSimpleSignIn.WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsxRuntime.jsx(IconListTile.IconListTile, { onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading, className: 'connect-with-wallet-button', children: jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', children: t('dyn_login.wallet_list.button_only') }) }));
66
+ return numberOfItensToShow > 0 ? (jsxRuntime.jsx(WalletSimpleSignIn.WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsxRuntime.jsx(IconListTile.IconListTile, { onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading, className: 'connect-with-wallet-button', children: jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', copykey: 'dyn_login.wallet_list.button_only', children: t('dyn_login.wallet_list.button_only') }) }));
67
67
  };
68
68
 
69
69
  exports.WalletSignInSection = WalletSignInSection;
@@ -59,7 +59,7 @@ import { WalletSimpleSignIn } from './WalletSimpleSignIn/WalletSimpleSignIn.js';
59
59
 
60
60
  const WalletSignInSection = ({ numberOfItensToShow, isLoading, onSubmit, }) => {
61
61
  const { t } = useTranslation();
62
- return numberOfItensToShow > 0 ? (jsx(WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsx(IconListTile, { onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading, className: 'connect-with-wallet-button', children: jsx(Typography, { variant: 'button_primary', children: t('dyn_login.wallet_list.button_only') }) }));
62
+ return numberOfItensToShow > 0 ? (jsx(WalletSimpleSignIn, { previewWalletsNumber: numberOfItensToShow, onshowAllWallets: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading })) : (jsx(IconListTile, { onClick: () => onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(), disabled: isLoading, className: 'connect-with-wallet-button', children: jsx(Typography, { variant: 'button_primary', copykey: 'dyn_login.wallet_list.button_only', children: t('dyn_login.wallet_list.button_only') }) }));
63
63
  };
64
64
 
65
65
  export { WalletSignInSection };
@@ -43,7 +43,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
43
43
  walletsFilter,
44
44
  });
45
45
  const isUsingMultiWallet = Boolean(localStorage.LocalStorage.getFromLS(localStorage$1.AUTH_USER));
46
- return !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxRuntime.jsxs("div", { className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list', children: [walletsList.map((wallet, index) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, `${wallet.key}_${index}`))), jsxRuntime.jsx(ListItemButton.ListItemButton, { text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] }));
46
+ return !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxRuntime.jsxs("div", { className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list', children: [walletsList.map((wallet, index) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, `${wallet.key}_${index}`))), jsxRuntime.jsx(ListItemButton.ListItemButton, { copykey: 'dyn_wallet_list.view_all', text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] }));
47
47
  };
48
48
 
49
49
  exports.WalletSimpleSignIn = WalletSimpleSignIn;
@@ -39,7 +39,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
39
39
  walletsFilter,
40
40
  });
41
41
  const isUsingMultiWallet = Boolean(LocalStorage.getFromLS(AUTH_USER));
42
- return !projectSettings ? (jsx(Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxs("div", { className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list', children: [walletsList.map((wallet, index) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, `${wallet.key}_${index}`))), jsx(ListItemButton, { text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] }));
42
+ return !projectSettings ? (jsx(Skeleton, { count: previewWalletsNumber + 1, className: 'login-with-email-wallet-list__skeleton' })) : (jsxs("div", { className: 'login-with-email-wallet-list__container', "data-testid": 'top-wallets-list', children: [walletsList.map((wallet, index) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: isUsingMultiWallet, disabled: disabled }, `${wallet.key}_${index}`))), jsx(ListItemButton, { copykey: 'dyn_wallet_list.view_all', text: t('dyn_wallet_list.view_all'), onClick: onshowAllWallets, numberOfWallets: numberOfWallets, disabled: disabled })] }));
43
43
  };
44
44
 
45
45
  export { WalletSimpleSignIn };
@@ -99,7 +99,7 @@ const MergeUserAccountsView = () => {
99
99
  throw new utils.DynamicError('Something went wrong, please try again.');
100
100
  }
101
101
  catch (e) {
102
- setError('Something went wrong, please try again.');
102
+ setError(t('dyn_merge_user_accounts.errors.merge_error'));
103
103
  if (user) {
104
104
  setShowAuthFlow(false);
105
105
  return;
@@ -119,9 +119,9 @@ const MergeUserAccountsView = () => {
119
119
  breakpoint: 4,
120
120
  cutEnd: 1,
121
121
  cutStart: 2,
122
- }) })] })] }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'title', className: 'merge-user-accounts__text merge-user-accounts__text__header', children: t('dyn_merge_user_accounts.title') }), jsxRuntime.jsxs(Typography.Typography, { weight: 'medium', variant: 'body_normal', className: 'merge-user-accounts__text merge-user-accounts__text__body', children: [t('dyn_merge_user_accounts.existing_account'), ' ', jsxRuntime.jsx("span", { className: 'merge-user-accounts__text--bold', children: shortenEmail.shortenEmail(email, {
122
+ }) })] })] }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'title', className: 'merge-user-accounts__text merge-user-accounts__text__header', copykey: 'dyn_merge_user_accounts.title', children: t('dyn_merge_user_accounts.title') }), jsxRuntime.jsxs(Typography.Typography, { weight: 'medium', variant: 'body_normal', className: 'merge-user-accounts__text merge-user-accounts__text__body', copykey: 'dyn_merge_user_accounts.existing_account', children: [t('dyn_merge_user_accounts.existing_account'), ' ', jsxRuntime.jsx("span", { className: 'merge-user-accounts__text--bold', children: shortenEmail.shortenEmail(email, {
123
123
  breakpoint: 14,
124
- }) }), ' ', t('dyn_merge_user_accounts.existing_account_trail')] }), jsxRuntime.jsxs("div", { className: 'merge-user-accounts__buttons', children: [jsxRuntime.jsx(Button.Button, { className: 'merge-user-accounts__buttons__button', onClick: handleMergeUserAccounts, buttonVariant: 'primary', buttonPadding: 'large', children: t('dyn_merge_user_accounts.confirm_button') }), jsxRuntime.jsx(Button.Button, { className: 'merge-user-accounts__buttons__button', onClick: handleUseDifferentEmail, buttonVariant: 'secondary', buttonPadding: 'large', children: t('dyn_merge_user_accounts.cancel_button') })] })] }));
124
+ }) }), ' ', t('dyn_merge_user_accounts.existing_account_trail')] }), jsxRuntime.jsxs("div", { className: 'merge-user-accounts__buttons', children: [jsxRuntime.jsx(Button.Button, { className: 'merge-user-accounts__buttons__button', onClick: handleMergeUserAccounts, buttonVariant: 'primary', buttonPadding: 'large', copykey: 'dyn_merge_user_accounts.confirm_button', children: t('dyn_merge_user_accounts.confirm_button') }), jsxRuntime.jsx(Button.Button, { className: 'merge-user-accounts__buttons__button', onClick: handleUseDifferentEmail, buttonVariant: 'secondary', buttonPadding: 'large', copykey: 'dyn_merge_user_accounts.cancel_button', children: t('dyn_merge_user_accounts.cancel_button') })] })] }));
125
125
  };
126
126
 
127
127
  exports.MergeUserAccountsView = MergeUserAccountsView;
@@ -95,7 +95,7 @@ const MergeUserAccountsView = () => {
95
95
  throw new DynamicError('Something went wrong, please try again.');
96
96
  }
97
97
  catch (e) {
98
- setError('Something went wrong, please try again.');
98
+ setError(t('dyn_merge_user_accounts.errors.merge_error'));
99
99
  if (user) {
100
100
  setShowAuthFlow(false);
101
101
  return;
@@ -115,9 +115,9 @@ const MergeUserAccountsView = () => {
115
115
  breakpoint: 4,
116
116
  cutEnd: 1,
117
117
  cutStart: 2,
118
- }) })] })] }), jsx(Typography, { weight: 'regular', variant: 'title', className: 'merge-user-accounts__text merge-user-accounts__text__header', children: t('dyn_merge_user_accounts.title') }), jsxs(Typography, { weight: 'medium', variant: 'body_normal', className: 'merge-user-accounts__text merge-user-accounts__text__body', children: [t('dyn_merge_user_accounts.existing_account'), ' ', jsx("span", { className: 'merge-user-accounts__text--bold', children: shortenEmail(email, {
118
+ }) })] })] }), jsx(Typography, { weight: 'regular', variant: 'title', className: 'merge-user-accounts__text merge-user-accounts__text__header', copykey: 'dyn_merge_user_accounts.title', children: t('dyn_merge_user_accounts.title') }), jsxs(Typography, { weight: 'medium', variant: 'body_normal', className: 'merge-user-accounts__text merge-user-accounts__text__body', copykey: 'dyn_merge_user_accounts.existing_account', children: [t('dyn_merge_user_accounts.existing_account'), ' ', jsx("span", { className: 'merge-user-accounts__text--bold', children: shortenEmail(email, {
119
119
  breakpoint: 14,
120
- }) }), ' ', t('dyn_merge_user_accounts.existing_account_trail')] }), jsxs("div", { className: 'merge-user-accounts__buttons', children: [jsx(Button, { className: 'merge-user-accounts__buttons__button', onClick: handleMergeUserAccounts, buttonVariant: 'primary', buttonPadding: 'large', children: t('dyn_merge_user_accounts.confirm_button') }), jsx(Button, { className: 'merge-user-accounts__buttons__button', onClick: handleUseDifferentEmail, buttonVariant: 'secondary', buttonPadding: 'large', children: t('dyn_merge_user_accounts.cancel_button') })] })] }));
120
+ }) }), ' ', t('dyn_merge_user_accounts.existing_account_trail')] }), jsxs("div", { className: 'merge-user-accounts__buttons', children: [jsx(Button, { className: 'merge-user-accounts__buttons__button', onClick: handleMergeUserAccounts, buttonVariant: 'primary', buttonPadding: 'large', copykey: 'dyn_merge_user_accounts.confirm_button', children: t('dyn_merge_user_accounts.confirm_button') }), jsx(Button, { className: 'merge-user-accounts__buttons__button', onClick: handleUseDifferentEmail, buttonVariant: 'secondary', buttonPadding: 'large', copykey: 'dyn_merge_user_accounts.cancel_button', children: t('dyn_merge_user_accounts.cancel_button') })] })] }));
121
121
  };
122
122
 
123
123
  export { MergeUserAccountsView };
@@ -113,9 +113,9 @@ const NetworkNotSupported = () => {
113
113
  network: walletConnectorNetwork,
114
114
  walletConnector,
115
115
  });
116
- return (jsxRuntime.jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', children: t('dyn_network_not_supported.warning_message') })), jsxRuntime.jsxs("div", { className: classNames.classNames('network-not-supported__content-container', {
116
+ return (jsxRuntime.jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', copykey: 'dyn_network_not_supported.warning_message', children: t('dyn_network_not_supported.warning_message') })), jsxRuntime.jsxs("div", { className: classNames.classNames('network-not-supported__content-container', {
117
117
  'network-not-supported__content-container--error': !_isSupportedNetwork,
118
- }), children: [jsxRuntime.jsx("div", { className: 'network-not-supported__img-container', children: jsxRuntime.jsx(walletBook.WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsxRuntime.jsx(UserAddress.UserAddress, { walletConnector: walletConnector }), jsxRuntime.jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsxRuntime.jsx("div", { className: 'network-not-supported__welcome-container', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsxRuntime.jsx(SelectNetworkButton.SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
118
+ }), children: [jsxRuntime.jsx("div", { className: 'network-not-supported__img-container', children: jsxRuntime.jsx(walletBook.WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsxRuntime.jsx(UserAddress.UserAddress, { walletConnector: walletConnector }), jsxRuntime.jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsxRuntime.jsx("div", { className: 'network-not-supported__welcome-container', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_network_not_supported.subtitle', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsxRuntime.jsx(SelectNetworkButton.SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
119
119
  };
120
120
 
121
121
  exports.NetworkNotSupported = NetworkNotSupported;
@@ -109,9 +109,9 @@ const NetworkNotSupported = () => {
109
109
  network: walletConnectorNetwork,
110
110
  walletConnector,
111
111
  });
112
- return (jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', children: t('dyn_network_not_supported.warning_message') })), jsxs("div", { className: classNames('network-not-supported__content-container', {
112
+ return (jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', copykey: 'dyn_network_not_supported.warning_message', children: t('dyn_network_not_supported.warning_message') })), jsxs("div", { className: classNames('network-not-supported__content-container', {
113
113
  'network-not-supported__content-container--error': !_isSupportedNetwork,
114
- }), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsx(NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsx("div", { className: 'network-not-supported__welcome-container', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsx(SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
114
+ }), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsx(NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsx("div", { className: 'network-not-supported__welcome-container', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_network_not_supported.subtitle', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsx(SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
115
115
  };
116
116
 
117
117
  export { NetworkNotSupported };
@@ -102,7 +102,9 @@ const NetworkNotSupportedSwitchManual = () => {
102
102
  width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
103
103
  } }));
104
104
  const walletConnectorNetworks = getWalletConnectorNetworks.getWalletConnectorNetworks(walletConnector);
105
- return (jsxRuntime.jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxRuntime.jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsxRuntime.jsx(Typography.Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', children: t('dyn_network_not_supported_manual_switch.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', children: walletConnectorNetworks.length
105
+ return (jsxRuntime.jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxRuntime.jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsxRuntime.jsx(Typography.Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', copykey: 'dyn_network_not_supported_manual_switch.title', children: t('dyn_network_not_supported_manual_switch.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: walletConnectorNetworks.length
106
+ ? 'dyn_network_not_supported_manual_switch.subtitle_network_defined'
107
+ : 'dyn_network_not_supported_manual_switch.subtitle_no_network_defined', children: walletConnectorNetworks.length
106
108
  ? t('dyn_network_not_supported_manual_switch.subtitle_network_defined', { network: walletConnectorNetworks[0].name })
107
109
  : t('dyn_network_not_supported_manual_switch.subtitle_no_network_defined') })] })] }));
108
110
  };
@@ -98,7 +98,9 @@ const NetworkNotSupportedSwitchManual = () => {
98
98
  width: pixelToRem(iconSize * iconRatio),
99
99
  } }));
100
100
  const walletConnectorNetworks = getWalletConnectorNetworks(walletConnector);
101
- return (jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsx(Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', children: t('dyn_network_not_supported_manual_switch.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', children: walletConnectorNetworks.length
101
+ return (jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsx(Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', copykey: 'dyn_network_not_supported_manual_switch.title', children: t('dyn_network_not_supported_manual_switch.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: walletConnectorNetworks.length
102
+ ? 'dyn_network_not_supported_manual_switch.subtitle_network_defined'
103
+ : 'dyn_network_not_supported_manual_switch.subtitle_no_network_defined', children: walletConnectorNetworks.length
102
104
  ? t('dyn_network_not_supported_manual_switch.subtitle_network_defined', { network: walletConnectorNetworks[0].name })
103
105
  : t('dyn_network_not_supported_manual_switch.subtitle_no_network_defined') })] })] }));
104
106
  };
@@ -96,7 +96,7 @@ const NoAccess = () => {
96
96
  const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
97
97
  const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
98
98
  const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
99
- return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(Button.Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
99
+ return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(Button.Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
100
100
  height: pixelToRem.pixelToRem(24),
101
101
  width: pixelToRem.pixelToRem(24),
102
102
  } }))] }), typeof socialMediaIconUrl === 'string' && (jsxRuntime.jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {
@@ -92,7 +92,7 @@ const NoAccess = () => {
92
92
  const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
93
93
  const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
94
94
  const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
95
- return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
95
+ return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
96
96
  height: pixelToRem(24),
97
97
  width: pixelToRem(24),
98
98
  } }))] }), typeof socialMediaIconUrl === 'string' && (jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {