@dynamic-labs/sdk-react-core 4.5.0 → 4.5.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 (252) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -11
  5. package/src/index.cjs +7 -7
  6. package/src/index.js +2 -2
  7. package/src/lib/components/Alert/Alert.cjs +6 -3
  8. package/src/lib/components/Alert/Alert.d.ts +1 -0
  9. package/src/lib/components/Alert/Alert.js +6 -4
  10. package/src/lib/components/Alert/AlertText/AlertText.cjs +16 -0
  11. package/src/lib/components/Alert/AlertText/AlertText.d.ts +7 -0
  12. package/src/lib/components/Alert/AlertText/AlertText.js +12 -0
  13. package/src/lib/components/Alert/AlertText/index.d.ts +1 -0
  14. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
  15. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
  16. package/src/lib/components/ShadowDOM/ShadowDOM.cjs +0 -2
  17. package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -2
  18. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
  19. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
  20. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  21. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  22. package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
  23. package/src/lib/components/UserProfile/UserProfile.js +1 -1
  24. package/src/lib/context/DynamicContext/DynamicContext.cjs +15 -12
  25. package/src/lib/context/DynamicContext/DynamicContext.js +15 -12
  26. package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +2 -2
  27. package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +3 -3
  28. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +0 -4
  29. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +0 -4
  30. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +7 -2
  31. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +7 -2
  32. package/src/lib/context/DynamicContext/hooks/usePasskeySuccessPopup/usePasskeySuccessPopup.cjs +2 -2
  33. package/src/lib/context/DynamicContext/hooks/usePasskeySuccessPopup/usePasskeySuccessPopup.js +3 -3
  34. package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +5 -2
  35. package/src/lib/context/ErrorContext/ErrorContext.cjs +7 -6
  36. package/src/lib/context/ErrorContext/ErrorContext.js +8 -7
  37. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +3 -3
  38. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +3 -3
  39. package/src/lib/context/ViewContext/ViewContext.cjs +7 -2
  40. package/src/lib/context/ViewContext/ViewContext.js +7 -2
  41. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  42. package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +5 -64
  43. package/src/lib/data/api/embeddedWallets/embeddedWallets.d.ts +2 -18
  44. package/src/lib/data/api/embeddedWallets/embeddedWallets.js +6 -61
  45. package/src/lib/data/api/wallets/wallets.cjs +1 -3
  46. package/src/lib/data/api/wallets/wallets.d.ts +1 -1
  47. package/src/lib/data/api/wallets/wallets.js +2 -4
  48. package/src/lib/events/embeddedWallet.d.ts +0 -4
  49. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +2 -6
  50. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +2 -6
  51. package/src/lib/locale/en/translation.cjs +4 -7
  52. package/src/lib/locale/en/translation.d.ts +3 -6
  53. package/src/lib/locale/en/translation.js +4 -7
  54. package/src/lib/main.global.cjs +1 -1
  55. package/src/lib/main.global.js +1 -1
  56. package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +8 -8
  57. package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +8 -8
  58. package/src/lib/modals/index.d.ts +0 -2
  59. package/src/lib/shared/utils/functions/index.d.ts +0 -2
  60. package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +7 -5
  61. package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +8 -6
  62. package/src/lib/styles/index.shadow.cjs +1 -1
  63. package/src/lib/styles/index.shadow.js +1 -1
  64. package/src/lib/utils/functions/index.d.ts +0 -5
  65. package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.cjs +1 -1
  66. package/src/lib/utils/functions/isAllowedToLinkWallet/isAllowedToLinkWallet.js +1 -1
  67. package/src/lib/utils/functions/onrampConfigurationToOnrampOption/onrampConfigurationToOnrampOption.cjs +1 -1
  68. package/src/lib/utils/functions/onrampConfigurationToOnrampOption/onrampConfigurationToOnrampOption.js +1 -1
  69. package/src/lib/utils/hooks/index.d.ts +0 -1
  70. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +0 -2
  71. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +0 -2
  72. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +2 -2
  73. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +3 -3
  74. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +16 -4
  75. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +16 -4
  76. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +3 -3
  77. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +3 -3
  78. package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.cjs +1 -1
  79. package/src/lib/utils/hooks/useCreateWalletConnectorOptions/useCreateWalletConnectorOptions.js +1 -1
  80. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +1 -6
  81. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +1 -6
  82. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +1 -1
  83. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +1 -1
  84. package/src/lib/utils/hooks/useElementById/useElementById.cjs +2 -2
  85. package/src/lib/utils/hooks/useElementById/useElementById.js +3 -3
  86. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -13
  87. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -13
  88. package/src/lib/utils/hooks/useEmbeddedWallet/index.d.ts +0 -1
  89. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +7 -23
  90. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +0 -2
  91. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +7 -23
  92. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +4 -4
  93. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +4 -4
  94. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +3 -3
  95. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +3 -3
  96. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -0
  97. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +1 -0
  98. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -1
  99. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -1
  100. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +2 -2
  101. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +2 -2
  102. package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.cjs +1 -1
  103. package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.js +1 -1
  104. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +11 -18
  105. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +12 -19
  106. package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +4 -4
  107. package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +4 -4
  108. package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +4 -4
  109. package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +4 -4
  110. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -4
  111. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -4
  112. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +0 -3
  113. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +0 -3
  114. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +0 -3
  115. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +0 -3
  116. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +0 -1
  117. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +0 -1
  118. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -24
  119. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -24
  120. package/src/lib/utils/validations/index.d.ts +0 -1
  121. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +2 -2
  122. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +2 -2
  123. package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
  124. package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
  125. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +12 -34
  126. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +13 -35
  127. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +2 -2
  128. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +2 -2
  129. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
  130. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
  131. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -1
  132. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -1
  133. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +1 -1
  134. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +1 -1
  135. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
  136. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
  137. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +11 -11
  138. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +11 -11
  139. package/src/lib/views/viewToComponentMap.cjs +0 -4
  140. package/src/lib/views/viewToComponentMap.d.ts +0 -2
  141. package/src/lib/views/viewToComponentMap.js +0 -4
  142. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +5 -7
  143. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +5 -7
  144. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -1
  145. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -1
  146. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +3 -3
  147. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +3 -3
  148. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
  149. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
  150. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
  151. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
  152. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
  153. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -1
  154. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -1
  155. package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs +4 -1
  156. package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.js +4 -1
  157. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs +1 -1
  158. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js +1 -1
  159. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.cjs +19 -11
  160. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.js +19 -11
  161. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
  162. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
  163. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.cjs +9 -5
  164. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js +9 -5
  165. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.cjs +6 -0
  166. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.js +6 -0
  167. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.cjs +14 -2
  168. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.js +14 -2
  169. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +7 -17
  170. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +8 -18
  171. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.cjs +0 -113
  172. package/src/lib/components/ToggleVisibilityButton/ToggleVisibilityButton.js +0 -109
  173. package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.cjs +0 -106
  174. package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.d.ts +0 -3
  175. package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.js +0 -102
  176. package/src/lib/modals/CreatePasswordModal/CreatePasswordModal.types.d.ts +0 -5
  177. package/src/lib/modals/CreatePasswordModal/index.d.ts +0 -1
  178. package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.cjs +0 -106
  179. package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.d.ts +0 -3
  180. package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.js +0 -102
  181. package/src/lib/modals/EnterPasswordModal/EnterPasswordModal.types.d.ts +0 -6
  182. package/src/lib/modals/EnterPasswordModal/index.d.ts +0 -1
  183. package/src/lib/shared/assets/alt-key.cjs +0 -55
  184. package/src/lib/shared/assets/alt-key.js +0 -31
  185. package/src/lib/shared/assets/lock.cjs +0 -55
  186. package/src/lib/shared/assets/lock.js +0 -31
  187. package/src/lib/shared/assets/save-password-hero.cjs +0 -128
  188. package/src/lib/shared/assets/save-password-hero.js +0 -104
  189. package/src/lib/shared/assets/wallet-claim-hero.cjs +0 -128
  190. package/src/lib/shared/assets/wallet-claim-hero.js +0 -104
  191. package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.cjs +0 -15
  192. package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.d.ts +0 -1
  193. package/src/lib/shared/utils/functions/generateRandomPassword/generateRandomPassword.js +0 -11
  194. package/src/lib/shared/utils/functions/generateRandomPassword/index.d.ts +0 -1
  195. package/src/lib/shared/utils/functions/validatePassword/index.d.ts +0 -1
  196. package/src/lib/shared/utils/functions/validatePassword/validatePassword.cjs +0 -60
  197. package/src/lib/shared/utils/functions/validatePassword/validatePassword.d.ts +0 -13
  198. package/src/lib/shared/utils/functions/validatePassword/validatePassword.js +0 -56
  199. package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.cjs +0 -8
  200. package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.d.ts +0 -2
  201. package/src/lib/utils/functions/findCoinbaseMPCWallet/findCoinbaseMPCWallet.js +0 -4
  202. package/src/lib/utils/functions/findCoinbaseMPCWallet/index.d.ts +0 -1
  203. package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.cjs +0 -53
  204. package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.d.ts +0 -9
  205. package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.js +0 -49
  206. package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/index.d.ts +0 -1
  207. package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.cjs +0 -14
  208. package/src/lib/utils/functions/isCoinbaseWaasEnabled/isCoinbaseWaasEnabled.js +0 -10
  209. package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/index.d.ts +0 -1
  210. package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.cjs +0 -16
  211. package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.d.ts +0 -2
  212. package/src/lib/utils/functions/requiresPasswordForEmbeddedWallet/requiresPasswordForEmbeddedWallet.js +0 -12
  213. package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/index.d.ts +0 -1
  214. package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.cjs +0 -39
  215. package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.d.ts +0 -2
  216. package/src/lib/utils/functions/requiresPasswordForEmbeddedWalletOnSignup/requiresPasswordForEmbeddedWalletOnSignup.js +0 -35
  217. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/index.d.ts +0 -2
  218. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/index.d.ts +0 -1
  219. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +0 -229
  220. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.d.ts +0 -5
  221. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +0 -225
  222. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.cjs +0 -191
  223. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.d.ts +0 -18
  224. package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useMPCEmbeddedWallet.js +0 -187
  225. package/src/lib/utils/hooks/useEmbeddedWalletPassword/index.d.ts +0 -1
  226. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +0 -141
  227. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.d.ts +0 -4
  228. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +0 -137
  229. package/src/lib/utils/validations/validateMPCProviderEnabled/index.d.ts +0 -1
  230. package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.cjs +0 -18
  231. package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.d.ts +0 -2
  232. package/src/lib/utils/validations/validateMPCProviderEnabled/validateMPCProviderEnabled.js +0 -14
  233. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +0 -116
  234. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.d.ts +0 -2
  235. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +0 -112
  236. package/src/lib/views/CoinbaseMPCClaimIntro/index.d.ts +0 -1
  237. package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.cjs +0 -197
  238. package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.d.ts +0 -12
  239. package/src/lib/views/CreatePasswordView/CreatePasswordStep/CreatePasswordStep.js +0 -193
  240. package/src/lib/views/CreatePasswordView/CreatePasswordStep/index.d.ts +0 -1
  241. package/src/lib/views/CreatePasswordView/CreatePasswordView.cjs +0 -169
  242. package/src/lib/views/CreatePasswordView/CreatePasswordView.d.ts +0 -9
  243. package/src/lib/views/CreatePasswordView/CreatePasswordView.js +0 -165
  244. package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.cjs +0 -141
  245. package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.d.ts +0 -12
  246. package/src/lib/views/CreatePasswordView/SavePasswordStep/SavePasswordStep.js +0 -137
  247. package/src/lib/views/CreatePasswordView/SavePasswordStep/index.d.ts +0 -1
  248. package/src/lib/views/CreatePasswordView/index.d.ts +0 -1
  249. package/src/lib/views/EnterPasswordView/EnterPasswordView.cjs +0 -141
  250. package/src/lib/views/EnterPasswordView/EnterPasswordView.d.ts +0 -8
  251. package/src/lib/views/EnterPasswordView/EnterPasswordView.js +0 -137
  252. package/src/lib/views/EnterPasswordView/index.d.ts +0 -1
@@ -124,9 +124,14 @@ const useFundingMethods = () => {
124
124
  const onrampOptions = React.useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => !isPaymentMethod), [enabledOnrampProviders]);
125
125
  const paymentMethods = React.useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => isPaymentMethod), [enabledOnrampProviders]);
126
126
  const handleQrClick = React.useCallback(() => setDynamicWidgetView('deposit-view'), [setDynamicWidgetView]);
127
- const handleBuyCryptoClick = React.useCallback(() => onrampOptions.length > 1
128
- ? setDynamicWidgetView('choose-onramp-provider')
129
- : onrampOptions[0].onClick(), [onrampOptions, setDynamicWidgetView]);
127
+ const handleBuyCryptoClick = React.useCallback(() => {
128
+ if (!primaryWallet) {
129
+ return;
130
+ }
131
+ onrampOptions.length > 1
132
+ ? setDynamicWidgetView('choose-onramp-provider')
133
+ : onrampOptions[0].onClick({ wallet: primaryWallet });
134
+ }, [onrampOptions, setDynamicWidgetView, primaryWallet]);
130
135
  const previewWalletIcons = React.useMemo(() => {
131
136
  if (!externalWalletFundingEnabled)
132
137
  return [];
@@ -150,15 +155,17 @@ const useFundingMethods = () => {
150
155
  showChevron: true,
151
156
  },
152
157
  ];
153
- paymentMethods.forEach(({ id, iconUrl, displayName, onClick }) => {
154
- methods.push({
155
- icon: jsxRuntime.jsx("img", { src: iconUrl, alt: displayName }),
156
- key: id,
157
- label: displayName,
158
- onClick,
159
- showChevron: false,
158
+ if (primaryWallet) {
159
+ paymentMethods.forEach(({ id, iconUrl, displayName, onClick }) => {
160
+ methods.push({
161
+ icon: jsxRuntime.jsx("img", { src: iconUrl, alt: displayName }),
162
+ key: id,
163
+ label: displayName,
164
+ onClick: () => onClick({ wallet: primaryWallet }),
165
+ showChevron: false,
166
+ });
160
167
  });
161
- });
168
+ }
162
169
  if (onrampOptions.length) {
163
170
  methods.push({
164
171
  icon: jsxRuntime.jsx(globe.ReactComponent, {}),
@@ -190,6 +197,7 @@ const useFundingMethods = () => {
190
197
  externalWalletFundingEnabled,
191
198
  startExternalWalletFunding,
192
199
  previewWalletIcons,
200
+ primaryWallet,
193
201
  ]);
194
202
  };
195
203
 
@@ -120,9 +120,14 @@ const useFundingMethods = () => {
120
120
  const onrampOptions = useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => !isPaymentMethod), [enabledOnrampProviders]);
121
121
  const paymentMethods = useMemo(() => enabledOnrampProviders.filter(({ isPaymentMethod }) => isPaymentMethod), [enabledOnrampProviders]);
122
122
  const handleQrClick = useCallback(() => setDynamicWidgetView('deposit-view'), [setDynamicWidgetView]);
123
- const handleBuyCryptoClick = useCallback(() => onrampOptions.length > 1
124
- ? setDynamicWidgetView('choose-onramp-provider')
125
- : onrampOptions[0].onClick(), [onrampOptions, setDynamicWidgetView]);
123
+ const handleBuyCryptoClick = useCallback(() => {
124
+ if (!primaryWallet) {
125
+ return;
126
+ }
127
+ onrampOptions.length > 1
128
+ ? setDynamicWidgetView('choose-onramp-provider')
129
+ : onrampOptions[0].onClick({ wallet: primaryWallet });
130
+ }, [onrampOptions, setDynamicWidgetView, primaryWallet]);
126
131
  const previewWalletIcons = useMemo(() => {
127
132
  if (!externalWalletFundingEnabled)
128
133
  return [];
@@ -146,15 +151,17 @@ const useFundingMethods = () => {
146
151
  showChevron: true,
147
152
  },
148
153
  ];
149
- paymentMethods.forEach(({ id, iconUrl, displayName, onClick }) => {
150
- methods.push({
151
- icon: jsx("img", { src: iconUrl, alt: displayName }),
152
- key: id,
153
- label: displayName,
154
- onClick,
155
- showChevron: false,
154
+ if (primaryWallet) {
155
+ paymentMethods.forEach(({ id, iconUrl, displayName, onClick }) => {
156
+ methods.push({
157
+ icon: jsx("img", { src: iconUrl, alt: displayName }),
158
+ key: id,
159
+ label: displayName,
160
+ onClick: () => onClick({ wallet: primaryWallet }),
161
+ showChevron: false,
162
+ });
156
163
  });
157
- });
164
+ }
158
165
  if (onrampOptions.length) {
159
166
  methods.push({
160
167
  icon: jsx(SvgGlobe, {}),
@@ -186,6 +193,7 @@ const useFundingMethods = () => {
186
193
  externalWalletFundingEnabled,
187
194
  startExternalWalletFunding,
188
195
  previewWalletIcons,
196
+ primaryWallet,
189
197
  ]);
190
198
  };
191
199
 
@@ -58,8 +58,6 @@ require('../../../../../context/UserFieldEditorContext/UserFieldEditorContext.cj
58
58
  require('@dynamic-labs/rpc-providers');
59
59
  require('../../../../../store/state/loadingAndLifecycle.cjs');
60
60
  require('../../../../../store/state/walletOptions/walletOptions.cjs');
61
- var getPasskeyProviderFromUserAgent = require('../../../helpers/getPasskeyProviderFromUserAgent.cjs');
62
- var getTimeSince = require('../../../helpers/getTimeSince.cjs');
63
61
  var Typography = require('../../../../../components/Typography/Typography.cjs');
64
62
  require('../../../../../context/FooterAnimationContext/index.cjs');
65
63
  require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
@@ -70,6 +68,8 @@ require('../../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCard
70
68
  require('../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
71
69
  require('../../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
72
70
  require('react-focus-lock');
71
+ var getPasskeyProviderFromUserAgent = require('../../../helpers/getPasskeyProviderFromUserAgent.cjs');
72
+ var getTimeSince = require('../../../helpers/getTimeSince.cjs');
73
73
  require('../../../context/DynamicWidgetContext.cjs');
74
74
  require('formik');
75
75
  require('../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
@@ -54,8 +54,6 @@ import '../../../../../context/UserFieldEditorContext/UserFieldEditorContext.js'
54
54
  import '@dynamic-labs/rpc-providers';
55
55
  import '../../../../../store/state/loadingAndLifecycle.js';
56
56
  import '../../../../../store/state/walletOptions/walletOptions.js';
57
- import { getPasskeyProviderFromUserAgent } from '../../../helpers/getPasskeyProviderFromUserAgent.js';
58
- import { getTimeSince } from '../../../helpers/getTimeSince.js';
59
57
  import { Typography } from '../../../../../components/Typography/Typography.js';
60
58
  import '../../../../../context/FooterAnimationContext/index.js';
61
59
  import '../../../../../components/ShadowDOM/ShadowDOM.js';
@@ -66,6 +64,8 @@ import '../../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardT
66
64
  import '../../../../../context/WalletGroupContext/WalletGroupContext.js';
67
65
  import '../../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
68
66
  import 'react-focus-lock';
67
+ import { getPasskeyProviderFromUserAgent } from '../../../helpers/getPasskeyProviderFromUserAgent.js';
68
+ import { getTimeSince } from '../../../helpers/getTimeSince.js';
69
69
  import '../../../context/DynamicWidgetContext.js';
70
70
  import 'formik';
71
71
  import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
@@ -123,7 +123,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
123
123
  const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
124
124
  const inputEmitter = formattedInputEmitter.createFormattedInputEmitter();
125
125
  const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
126
- var _a, _b, _c, _d, _e, _f;
126
+ var _a, _b, _c, _d, _e, _f, _g;
127
127
  // For now we hardcode the default value, soon we will fetch this from project settings
128
128
  const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
129
129
  rule: 'recommended',
@@ -208,10 +208,11 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
208
208
  },
209
209
  { amount: tokenAmount, symbol: tokenSymbol },
210
210
  ];
211
+ const secondaryDisplayHasFixedZeros = isFiatToken.isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
211
212
  const secondaryDisplay = formatValue.formatValue({
212
213
  symbol: secondaryData.symbol,
213
214
  value: secondaryData.amount,
214
- withFixedZeros: isFiatToken.isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC',
215
+ withFixedZeros: secondaryDisplayHasFixedZeros,
215
216
  });
216
217
  const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
217
218
  ? { token: 'USD', values: quickSuggestions }
@@ -251,6 +252,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
251
252
  inputEmitter.emit('focus');
252
253
  };
253
254
  const handleSubmit = useSubmitExternalWalletFunding.useSubmitExternalWalletFunding();
255
+ const grayOutSecondaryDisplay = !isNonZero.isNonZero(secondaryData.amount) ||
256
+ (secondaryDisplayHasFixedZeros &&
257
+ parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
254
258
  const inputSymbolProp = primaryData.symbol === 'USD'
255
259
  ? { leading: '$' }
256
260
  : { trailing: primaryData.symbol };
@@ -265,17 +269,17 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
265
269
  value: minimum.value,
266
270
  }),
267
271
  }) })), primaryData.amount !== undefined && (jsxRuntime.jsx(FormattedInput.FormattedInput, Object.assign({ className: 'fund-from-wallet__content__amount-container__amount', value: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact'
268
- ? (_f = formatValue.formatValue({
272
+ ? (_g = formatValue.formatValue({
269
273
  maxDecimals: 8,
270
274
  symbol: undefined,
271
275
  value: primaryData.amount,
272
276
  withFixedZeros: isFiatToken.isFiatToken(primaryData.symbol) ||
273
277
  primaryData.symbol === 'USDC',
274
- })) !== null && _f !== void 0 ? _f : primaryData.amount
278
+ })) !== null && _g !== void 0 ? _g : primaryData.amount
275
279
  : primaryData.amount, onChange: primaryData.setAmount, emitter: inputEmitter, onInteraction: () => setHasUserInteracted(true), locked: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact' }, inputSymbolProp))), primaryData.amount === undefined && (jsxRuntime.jsx(Skeleton.Skeleton, { dataTestId: 'primary-amount-skeleton', container: {
276
280
  className: 'fund-from-wallet__content__amount-container__skeleton',
277
281
  } })), showQuickSuggestions && (jsxRuntime.jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', className: classNames.classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
278
- 'fund-from-wallet__content__amount-container__secondary-amount-container__amount--zero': !isNonZero.isNonZero(secondaryData.amount),
282
+ 'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
279
283
  }), children: secondaryDisplay }), jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-secondary', className: 'fund-from-wallet__content__amount-container__secondary-amount-container__switch', children: jsxRuntime.jsx(switchToggle.ReactComponent, { "data-testid": 'switch-primary-and-secondary', onClick: switchPrimaryAndSecondary }) })] })), !showQuickSuggestions && !secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-missing', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', children: formatValue.formatValue({
280
284
  symbol: secondaryData.symbol,
281
285
  value: consts.UNAVAILABLE_VALUE,
@@ -119,7 +119,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
119
119
  const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
120
120
  const inputEmitter = createFormattedInputEmitter();
121
121
  const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
122
- var _a, _b, _c, _d, _e, _f;
122
+ var _a, _b, _c, _d, _e, _f, _g;
123
123
  // For now we hardcode the default value, soon we will fetch this from project settings
124
124
  const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
125
125
  rule: 'recommended',
@@ -204,10 +204,11 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
204
204
  },
205
205
  { amount: tokenAmount, symbol: tokenSymbol },
206
206
  ];
207
+ const secondaryDisplayHasFixedZeros = isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
207
208
  const secondaryDisplay = formatValue({
208
209
  symbol: secondaryData.symbol,
209
210
  value: secondaryData.amount,
210
- withFixedZeros: isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC',
211
+ withFixedZeros: secondaryDisplayHasFixedZeros,
211
212
  });
212
213
  const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
213
214
  ? { token: 'USD', values: quickSuggestions }
@@ -247,6 +248,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
247
248
  inputEmitter.emit('focus');
248
249
  };
249
250
  const handleSubmit = useSubmitExternalWalletFunding();
251
+ const grayOutSecondaryDisplay = !isNonZero(secondaryData.amount) ||
252
+ (secondaryDisplayHasFixedZeros &&
253
+ parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
250
254
  const inputSymbolProp = primaryData.symbol === 'USD'
251
255
  ? { leading: '$' }
252
256
  : { trailing: primaryData.symbol };
@@ -261,17 +265,17 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
261
265
  value: minimum.value,
262
266
  }),
263
267
  }) })), primaryData.amount !== undefined && (jsx(FormattedInput, Object.assign({ className: 'fund-from-wallet__content__amount-container__amount', value: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact'
264
- ? (_f = formatValue({
268
+ ? (_g = formatValue({
265
269
  maxDecimals: 8,
266
270
  symbol: undefined,
267
271
  value: primaryData.amount,
268
272
  withFixedZeros: isFiatToken(primaryData.symbol) ||
269
273
  primaryData.symbol === 'USDC',
270
- })) !== null && _f !== void 0 ? _f : primaryData.amount
274
+ })) !== null && _g !== void 0 ? _g : primaryData.amount
271
275
  : primaryData.amount, onChange: primaryData.setAmount, emitter: inputEmitter, onInteraction: () => setHasUserInteracted(true), locked: (initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.rule) === 'exact' }, inputSymbolProp))), primaryData.amount === undefined && (jsx(Skeleton, { dataTestId: 'primary-amount-skeleton', container: {
272
276
  className: 'fund-from-wallet__content__amount-container__skeleton',
273
277
  } })), showQuickSuggestions && (jsx("div", { className: 'fund-from-wallet__content__amount-container__quick-suggestions', children: quickSuggestionsParsed.map(({ display, value }) => (jsx(Typography, { variant: 'body_small', color: 'secondary', onClick: () => handleQuickSuggestion(value), children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [jsx(Typography, { weight: 'medium', className: classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
274
- 'fund-from-wallet__content__amount-container__secondary-amount-container__amount--zero': !isNonZero(secondaryData.amount),
278
+ 'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
275
279
  }), children: secondaryDisplay }), jsx(Icon, { size: 'small', color: 'text-secondary', className: 'fund-from-wallet__content__amount-container__secondary-amount-container__switch', children: jsx(SvgSwitchToggle, { "data-testid": 'switch-primary-and-secondary', onClick: switchPrimaryAndSecondary }) })] })), !showQuickSuggestions && !secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-missing', children: [jsx(Typography, { weight: 'medium', children: formatValue({
276
280
  symbol: secondaryData.symbol,
277
281
  value: UNAVAILABLE_VALUE,
@@ -32,6 +32,12 @@ const formatValue = ({ value, symbol, withFixedZeros = false, maxDecimals, }) =>
32
32
  if (value === undefined)
33
33
  return undefined;
34
34
  const parsed = value === '' ? 0 : parseFloat(value.toString());
35
+ if (parsed === 0)
36
+ return addSymbol(withFixedZeros ? '0.00' : '0', symbol);
37
+ // When value is inferior to 0.01 and withFixedZeros is true, we would return 0.00,
38
+ // so to avoid this misleading behavior, we return a less than 0.01 value
39
+ if (withFixedZeros && parsed < 0.0099)
40
+ return `< ${addSymbol('0.01', symbol)}`;
35
41
  const categorized = categorizeValue(parsed);
36
42
  const categorySymbol = typeof categorized === 'object' ? categorized.symbol : '';
37
43
  let formattedValue;
@@ -28,6 +28,12 @@ const formatValue = ({ value, symbol, withFixedZeros = false, maxDecimals, }) =>
28
28
  if (value === undefined)
29
29
  return undefined;
30
30
  const parsed = value === '' ? 0 : parseFloat(value.toString());
31
+ if (parsed === 0)
32
+ return addSymbol(withFixedZeros ? '0.00' : '0', symbol);
33
+ // When value is inferior to 0.01 and withFixedZeros is true, we would return 0.00,
34
+ // so to avoid this misleading behavior, we return a less than 0.01 value
35
+ if (withFixedZeros && parsed < 0.0099)
36
+ return `< ${addSymbol('0.01', symbol)}`;
31
37
  const categorized = categorizeValue(parsed);
32
38
  const categorySymbol = typeof categorized === 'object' ? categorized.symbol : '';
33
39
  let formattedValue;
@@ -4,14 +4,19 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../../../../../../_virtual/_tslib.cjs');
7
+ var jsxRuntime = require('react/jsx-runtime');
7
8
  var React = require('react');
9
+ var reactI18next = require('react-i18next');
10
+ var Typography = require('../../../../../../components/Typography/Typography.cjs');
8
11
  var logger = require('../../../../../../shared/logger.cjs');
12
+ var pixelToRem = require('../../../../../../utils/functions/pixelToRem/pixelToRem.cjs');
9
13
  var useFundWithWallet = require('../../../../../../utils/hooks/useFundWithWallet/useFundWithWallet.cjs');
10
14
  var DynamicWidgetContext = require('../../../../context/DynamicWidgetContext.cjs');
11
15
 
12
16
  const useSubmitExternalWalletFunding = () => {
13
17
  const { fund } = useFundWithWallet.useFundWithWallet();
14
18
  const { goToInitialDynamicWidgetView, setHeaderAlert } = DynamicWidgetContext.useWidgetContext();
19
+ const { t } = reactI18next.useTranslation();
15
20
  return React.useCallback((_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ tokenAmount, externalWallet, tokenSymbol, tokenBalances, }) {
16
21
  var _b;
17
22
  if (!tokenAmount)
@@ -29,16 +34,23 @@ const useSubmitExternalWalletFunding = () => {
29
34
  token: token === 'native' ? undefined : token,
30
35
  });
31
36
  logger.logger.info(`Funding with external wallet succeeded with transaction id: ${txId}`);
37
+ const blockExplorerUrl = (yield externalWallet.connector.getBlockExplorerUrlsForCurrentNetwork())[0];
38
+ const TxnSuccessAlert = (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'current-color', children: [t('dyn_wallet_funding.success'), blockExplorerUrl && (jsxRuntime.jsx(Typography.Typography, { as: 'a', href: `${blockExplorerUrl}/tx/${txId}`, target: '_blank', rel: 'noreferrer', style: {
39
+ marginLeft: pixelToRem.pixelToRem(4),
40
+ textDecoration: 'underline',
41
+ textDecorationThickness: pixelToRem.pixelToRem(1),
42
+ textUnderlineOffset: pixelToRem.pixelToRem(2),
43
+ }, weight: 'bold', color: 'current-color', children: t('dyn_wallet_funding.success_txn_link') }))] }));
32
44
  goToInitialDynamicWidgetView();
33
45
  setHeaderAlert({
34
- copykey: 'dyn_wallet_funding.success',
46
+ content: TxnSuccessAlert,
35
47
  variant: 'success',
36
48
  });
37
49
  }
38
50
  catch (error) {
39
51
  logger.logger.error('Failed to fund with external wallet', error);
40
52
  }
41
- }), [fund, goToInitialDynamicWidgetView, setHeaderAlert]);
53
+ }), [fund, goToInitialDynamicWidgetView, setHeaderAlert, t]);
42
54
  };
43
55
 
44
56
  exports.useSubmitExternalWalletFunding = useSubmitExternalWalletFunding;
@@ -1,13 +1,18 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../../../../_virtual/_tslib.js';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
4
  import { useCallback } from 'react';
5
+ import { useTranslation } from 'react-i18next';
6
+ import { Typography } from '../../../../../../components/Typography/Typography.js';
4
7
  import { logger } from '../../../../../../shared/logger.js';
8
+ import { pixelToRem } from '../../../../../../utils/functions/pixelToRem/pixelToRem.js';
5
9
  import { useFundWithWallet } from '../../../../../../utils/hooks/useFundWithWallet/useFundWithWallet.js';
6
10
  import { useWidgetContext } from '../../../../context/DynamicWidgetContext.js';
7
11
 
8
12
  const useSubmitExternalWalletFunding = () => {
9
13
  const { fund } = useFundWithWallet();
10
14
  const { goToInitialDynamicWidgetView, setHeaderAlert } = useWidgetContext();
15
+ const { t } = useTranslation();
11
16
  return useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ tokenAmount, externalWallet, tokenSymbol, tokenBalances, }) {
12
17
  var _b;
13
18
  if (!tokenAmount)
@@ -25,16 +30,23 @@ const useSubmitExternalWalletFunding = () => {
25
30
  token: token === 'native' ? undefined : token,
26
31
  });
27
32
  logger.info(`Funding with external wallet succeeded with transaction id: ${txId}`);
33
+ const blockExplorerUrl = (yield externalWallet.connector.getBlockExplorerUrlsForCurrentNetwork())[0];
34
+ const TxnSuccessAlert = (jsxs(Typography, { variant: 'body_normal', color: 'current-color', children: [t('dyn_wallet_funding.success'), blockExplorerUrl && (jsx(Typography, { as: 'a', href: `${blockExplorerUrl}/tx/${txId}`, target: '_blank', rel: 'noreferrer', style: {
35
+ marginLeft: pixelToRem(4),
36
+ textDecoration: 'underline',
37
+ textDecorationThickness: pixelToRem(1),
38
+ textUnderlineOffset: pixelToRem(2),
39
+ }, weight: 'bold', color: 'current-color', children: t('dyn_wallet_funding.success_txn_link') }))] }));
28
40
  goToInitialDynamicWidgetView();
29
41
  setHeaderAlert({
30
- copykey: 'dyn_wallet_funding.success',
42
+ content: TxnSuccessAlert,
31
43
  variant: 'success',
32
44
  });
33
45
  }
34
46
  catch (error) {
35
47
  logger.error('Failed to fund with external wallet', error);
36
48
  }
37
- }), [fund, goToInitialDynamicWidgetView, setHeaderAlert]);
49
+ }), [fund, goToInitialDynamicWidgetView, setHeaderAlert, t]);
38
50
  };
39
51
 
40
52
  export { useSubmitExternalWalletFunding };
@@ -18,7 +18,6 @@ require('@dynamic-labs/sdk-api-core');
18
18
  require('../../../../shared/logger.cjs');
19
19
  require('@dynamic-labs/iconic');
20
20
  var add = require('../../../../shared/assets/add.cjs');
21
- var altKey = require('../../../../shared/assets/alt-key.cjs');
22
21
  var androidTouchId = require('../../../../shared/assets/android-touch-id.cjs');
23
22
  var checkCircle = require('../../../../shared/assets/check-circle.cjs');
24
23
  var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
@@ -62,7 +61,6 @@ require('bs58');
62
61
  require('@dynamic-labs/types');
63
62
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
64
63
  require('../../../../context/LoadingContext/LoadingContext.cjs');
65
- var useEmbeddedWallet = require('../../../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
66
64
  require('../../../../context/WalletContext/WalletContext.cjs');
67
65
  var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
68
66
  require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
@@ -119,14 +117,13 @@ require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
119
117
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
120
118
 
121
119
  const SettingsView = () => {
122
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
120
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
123
121
  const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext.useInternalDynamicContext();
124
122
  const { globalWallet } =
125
123
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
126
124
  (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _a !== void 0 ? _a : {};
127
125
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
128
126
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator.useEmbeddedWalletAuthenticator();
129
- const { createPassword } = useEmbeddedWallet.useEmbeddedWallet();
130
127
  const { initExportProcess } = useEmbeddedReveal.useEmbeddedReveal();
131
128
  const { isTurnkeyWallet, isTurnkeyWalletWithoutAuthenticator, hasRecoveryEmail, } = useIsTurnkeyWallet.useIsTurnkeyWallet();
132
129
  const { theme } = ThemeContext.useThemeContext();
@@ -134,12 +131,9 @@ const SettingsView = () => {
134
131
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
135
132
  const [isLoading, setIsLoading] = React.useState(false);
136
133
  const { getEOAWallet } = useSmartWallets.useSmartWallets();
137
- const cbWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === 'coinbasempc')) === null || _c === void 0 ? void 0 : _c.walletProperties;
138
- const isCoinbaseWallet = walletConnectorCore.isCoinbaseMpcWalletConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
139
- const hasClaimedCoinbaseMPC = Boolean(cbWalletProperties === null || cbWalletProperties === void 0 ? void 0 : cbWalletProperties.claimed);
140
- const turnkeyWalletProperties = (_e = (_d = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _e === void 0 ? void 0 : _e.walletProperties;
134
+ const turnkeyWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _c === void 0 ? void 0 : _c.walletProperties;
141
135
  const isTurnkeyHDWallet = turnkeyWalletProperties === null || turnkeyWalletProperties === void 0 ? void 0 : turnkeyWalletProperties.turnkeyHDWalletId;
142
- const isPasskeyEnabled = Boolean((_j = (_h = (_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.supportedSecurityMethods) === null || _h === void 0 ? void 0 : _h.passkey) === null || _j === void 0 ? void 0 : _j.isEnabled);
136
+ const isPasskeyEnabled = Boolean((_g = (_f = (_e = (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.embeddedWallets) === null || _e === void 0 ? void 0 : _e.supportedSecurityMethods) === null || _f === void 0 ? void 0 : _f.passkey) === null || _g === void 0 ? void 0 : _g.isEnabled);
143
137
  const isTurnkeyWalletWithAuthenticator = isTurnkeyWallet && !isTurnkeyWalletWithoutAuthenticator;
144
138
  const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
145
139
  const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
@@ -184,12 +178,10 @@ const SettingsView = () => {
184
178
  return jsxRuntime.jsx(spinner.Spinner, {});
185
179
  return jsxRuntime.jsx(add.ReactComponent, { "data-testid": 'email-add-icon' });
186
180
  };
187
- const isEmbeddedWallet = Boolean(wallet &&
188
- (((_l = (_k = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _k === void 0 ? void 0 : _k.key) === null || _l === void 0 ? void 0 : _l.startsWith('turnkey')) ||
189
- ((_o = (_m = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _m === void 0 ? void 0 : _m.key) === null || _o === void 0 ? void 0 : _o.startsWith('coinbasempc'))));
190
- const isMfaEnabled = Boolean((_q = (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _p === void 0 ? void 0 : _p.mfa) === null || _q === void 0 ? void 0 : _q.enabled);
181
+ const isEmbeddedWallet = Boolean(wallet && ((_j = (_h = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _h === void 0 ? void 0 : _h.key) === null || _j === void 0 ? void 0 : _j.startsWith('turnkey')));
182
+ const isMfaEnabled = Boolean((_l = (_k = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _k === void 0 ? void 0 : _k.mfa) === null || _l === void 0 ? void 0 : _l.enabled);
191
183
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
192
- const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
184
+ const shouldShowSecuritySection = isMfaEnabled || shouldShowPasskeyMFA;
193
185
  return (jsxRuntime.jsxs("div", { className: 'settings-view', children: [jsxRuntime.jsxs("div", { className: 'settings-view__body', children: [jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'currency-button', buttonClassName: classNames.classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
194
186
  // eslint-disable-next-line react/jsx-wrap-multilines
195
187
  jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(currency.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_section.currency.badge', children: t('dyn_settings.global_section.currency.title') }), jsxRuntime.jsx(Badge.Badge, { text: t('dyn_settings.global_section.currency.badge'), copykey: 'dyn_settings.global_section.currency.badge', variant: 'secondary' })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: true, showInternalLoading: false })] }), globalWallet && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_connectivity_section.title') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => handleConnectedAppsClick(), dataTestId: 'connected-apps-button', buttonClassName: 'settings-view__body__section__button', startSlot:
@@ -202,9 +194,7 @@ const SettingsView = () => {
202
194
  // eslint-disable-next-line react/jsx-wrap-multilines
203
195
  jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, { className: 'settings-view__body__section__button__icon', defaultIcon: jsxRuntime.jsx(androidTouchId.ReactComponent, { "data-testid": 'default-icon' }) }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsxRuntime.jsx(Badge.Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isMfaEnabled && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-mfa-button', onClick: () => setDynamicWidgetView('manage-mfa'), buttonClassName: 'settings-view__body__section__button', startSlot:
204
196
  // eslint-disable-next-line react/jsx-wrap-multilines
205
- jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(shield.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'settings-view__body__section__button', startSlot:
206
- // eslint-disable-next-line react/jsx-wrap-multilines
207
- jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(altKey.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsxRuntime.jsx(checkCircle.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isEmbeddedWallet && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isTurnkeyWallet &&
197
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(shield.ReactComponent, { className: 'settings-view__body__section__button__icon' }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] })), isEmbeddedWallet && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isTurnkeyWallet &&
208
198
  !hasRecoveryEmail &&
209
199
  !isSessionKeyCompatible && (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('settings-view__body__section__title', 'settings-view__body__section__title__info-icon'), children: [t('dyn_settings.identity_section.title'), jsxRuntime.jsx(Icon.Icon, { size: 'small', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, { className: 'settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames.classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
210
200
  // eslint-disable-next-line react/jsx-wrap-multilines
@@ -3,7 +3,7 @@ import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import { useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
- import { isCoinbaseMpcWalletConnector, isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
6
+ import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
7
7
  import { Badge } from '../../../../components/Badge/Badge.js';
8
8
  import { Icon } from '../../../../components/Icon/Icon.js';
9
9
  import { Spinner } from '../../../../components/Spinner/spinner.js';
@@ -14,7 +14,6 @@ import '@dynamic-labs/sdk-api-core';
14
14
  import '../../../../shared/logger.js';
15
15
  import '@dynamic-labs/iconic';
16
16
  import { ReactComponent as SvgAdd } from '../../../../shared/assets/add.js';
17
- import { ReactComponent as SvgAltKey } from '../../../../shared/assets/alt-key.js';
18
17
  import { ReactComponent as SvgAndroidTouchId } from '../../../../shared/assets/android-touch-id.js';
19
18
  import { ReactComponent as SvgCheckCircle } from '../../../../shared/assets/check-circle.js';
20
19
  import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
@@ -58,7 +57,6 @@ import 'bs58';
58
57
  import '@dynamic-labs/types';
59
58
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
60
59
  import '../../../../context/LoadingContext/LoadingContext.js';
61
- import { useEmbeddedWallet } from '../../../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
62
60
  import '../../../../context/WalletContext/WalletContext.js';
63
61
  import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
64
62
  import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
@@ -115,14 +113,13 @@ import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
115
113
  import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
116
114
 
117
115
  const SettingsView = () => {
118
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
116
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
119
117
  const { projectSettings, primaryWallet, user, handleLogOut } = useInternalDynamicContext();
120
118
  const { globalWallet } =
121
119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
122
120
  (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) !== null && _a !== void 0 ? _a : {};
123
121
  const { setDynamicWidgetView } = useWidgetContext();
124
122
  const { addEmbeddedWalletRecoveryEmail } = useEmbeddedWalletAuthenticator();
125
- const { createPassword } = useEmbeddedWallet();
126
123
  const { initExportProcess } = useEmbeddedReveal();
127
124
  const { isTurnkeyWallet, isTurnkeyWalletWithoutAuthenticator, hasRecoveryEmail, } = useIsTurnkeyWallet();
128
125
  const { theme } = useThemeContext();
@@ -130,12 +127,9 @@ const SettingsView = () => {
130
127
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
131
128
  const [isLoading, setIsLoading] = useState(false);
132
129
  const { getEOAWallet } = useSmartWallets();
133
- const cbWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === 'coinbasempc')) === null || _c === void 0 ? void 0 : _c.walletProperties;
134
- const isCoinbaseWallet = isCoinbaseMpcWalletConnector(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
135
- const hasClaimedCoinbaseMPC = Boolean(cbWalletProperties === null || cbWalletProperties === void 0 ? void 0 : cbWalletProperties.claimed);
136
- const turnkeyWalletProperties = (_e = (_d = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _d === void 0 ? void 0 : _d.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _e === void 0 ? void 0 : _e.walletProperties;
130
+ const turnkeyWalletProperties = (_c = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.find(({ walletName }) => walletName === null || walletName === void 0 ? void 0 : walletName.startsWith('turnkey'))) === null || _c === void 0 ? void 0 : _c.walletProperties;
137
131
  const isTurnkeyHDWallet = turnkeyWalletProperties === null || turnkeyWalletProperties === void 0 ? void 0 : turnkeyWalletProperties.turnkeyHDWalletId;
138
- const isPasskeyEnabled = Boolean((_j = (_h = (_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.supportedSecurityMethods) === null || _h === void 0 ? void 0 : _h.passkey) === null || _j === void 0 ? void 0 : _j.isEnabled);
132
+ const isPasskeyEnabled = Boolean((_g = (_f = (_e = (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.embeddedWallets) === null || _e === void 0 ? void 0 : _e.supportedSecurityMethods) === null || _f === void 0 ? void 0 : _f.passkey) === null || _g === void 0 ? void 0 : _g.isEnabled);
139
133
  const isTurnkeyWalletWithAuthenticator = isTurnkeyWallet && !isTurnkeyWalletWithoutAuthenticator;
140
134
  const eoaWallet = primaryWallet && getEOAWallet(primaryWallet);
141
135
  const wallet = eoaWallet !== null && eoaWallet !== void 0 ? eoaWallet : primaryWallet;
@@ -180,12 +174,10 @@ const SettingsView = () => {
180
174
  return jsx(Spinner, {});
181
175
  return jsx(SvgAdd, { "data-testid": 'email-add-icon' });
182
176
  };
183
- const isEmbeddedWallet = Boolean(wallet &&
184
- (((_l = (_k = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _k === void 0 ? void 0 : _k.key) === null || _l === void 0 ? void 0 : _l.startsWith('turnkey')) ||
185
- ((_o = (_m = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _m === void 0 ? void 0 : _m.key) === null || _o === void 0 ? void 0 : _o.startsWith('coinbasempc'))));
186
- const isMfaEnabled = Boolean((_q = (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _p === void 0 ? void 0 : _p.mfa) === null || _q === void 0 ? void 0 : _q.enabled);
177
+ const isEmbeddedWallet = Boolean(wallet && ((_j = (_h = wallet === null || wallet === void 0 ? void 0 : wallet.connector) === null || _h === void 0 ? void 0 : _h.key) === null || _j === void 0 ? void 0 : _j.startsWith('turnkey')));
178
+ const isMfaEnabled = Boolean((_l = (_k = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.security) === null || _k === void 0 ? void 0 : _k.mfa) === null || _l === void 0 ? void 0 : _l.enabled);
187
179
  const shouldShowPasskeyMFA = isPasskeyEnabled && isTurnkeyWallet && !isSessionKeyCompatible;
188
- const shouldShowSecuritySection = isMfaEnabled || isCoinbaseWallet || shouldShowPasskeyMFA;
180
+ const shouldShowSecuritySection = isMfaEnabled || shouldShowPasskeyMFA;
189
181
  return (jsxs("div", { className: 'settings-view', children: [jsxs("div", { className: 'settings-view__body', children: [jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_section.title') }), jsx(TypographyButton, { dataTestId: 'currency-button', buttonClassName: classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
190
182
  // eslint-disable-next-line react/jsx-wrap-multilines
191
183
  jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgCurrency, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.global_section.currency.badge', children: t('dyn_settings.global_section.currency.title') }), jsx(Badge, { text: t('dyn_settings.global_section.currency.badge'), copykey: 'dyn_settings.global_section.currency.badge', variant: 'secondary' })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: true, showInternalLoading: false })] }), globalWallet && (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: t('dyn_settings.global_connectivity_section.title') }), jsx(TypographyButton, { onClick: () => handleConnectedAppsClick(), dataTestId: 'connected-apps-button', buttonClassName: 'settings-view__body__section__button', startSlot:
@@ -198,9 +190,7 @@ const SettingsView = () => {
198
190
  // eslint-disable-next-line react/jsx-wrap-multilines
199
191
  jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(PasskeyDeviceIcon, { className: 'settings-view__body__section__button__icon', defaultIcon: jsx(SvgAndroidTouchId, { "data-testid": 'default-icon' }) }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.passkey_button') }), !isTurnkeyWalletWithAuthenticator && (jsx(Badge, { text: t('dyn_settings.tags.recommended'), copykey: 'dyn_settings.tags.recommended', variant: 'secondary' }))] }), endSlot: renderPasskeysButtonEndSlot(), disabled: isLoading, showInternalLoading: false })), isMfaEnabled && (jsx(TypographyButton, { dataTestId: 'manage-mfa-button', onClick: () => setDynamicWidgetView('manage-mfa'), buttonClassName: 'settings-view__body__section__button', startSlot:
200
192
  // eslint-disable-next-line react/jsx-wrap-multilines
201
- jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgShield, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false })), isCoinbaseWallet && (jsx(TypographyButton, { dataTestId: 'manage-password-button', onClick: () => createPassword(!hasClaimedCoinbaseMPC), buttonClassName: 'settings-view__body__section__button', startSlot:
202
- // eslint-disable-next-line react/jsx-wrap-multilines
203
- jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgAltKey, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.passkey_button', children: t('dyn_settings.security_section.password_button') })] }), endSlot: hasClaimedCoinbaseMPC ? (jsx(SvgCheckCircle, { className: 'settings-view__body__section__button__icon-secondary--success' })) : undefined, showInternalLoading: false }))] })), isEmbeddedWallet && (jsxs(Fragment, { children: [isTurnkeyWallet &&
193
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgShield, { className: 'settings-view__body__section__button__icon' }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.security_section.mfa_button', children: t('dyn_settings.security_section.mfa_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), disabled: isLoading, showInternalLoading: false }))] })), isEmbeddedWallet && (jsxs(Fragment, { children: [isTurnkeyWallet &&
204
194
  !hasRecoveryEmail &&
205
195
  !isSessionKeyCompatible && (jsxs("div", { className: 'settings-view__body__section', children: [jsxs("div", { className: classNames('settings-view__body__section__title', 'settings-view__body__section__title__info-icon'), children: [t('dyn_settings.identity_section.title'), jsx(Icon, { size: 'small', children: jsx(SvgFooterInfoIcon, { className: 'settings-view__body__section__title__info-icon', "data-testid": 'email-info-icon-title' }) })] }), jsx(TypographyButton, { dataTestId: 'manage-email-recovery-button', onClick: addEmbeddedWalletRecoveryEmail, buttonClassName: classNames('settings-view__body__section__button', 'settings-view__body__section__button__badge'), startSlot:
206
196
  // eslint-disable-next-line react/jsx-wrap-multilines