@dynamic-labs/sdk-react-core 4.5.1 → 4.5.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 (719) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  5. package/src/index.cjs +1 -0
  6. package/src/index.js +1 -0
  7. package/src/lib/Main.cjs +1 -0
  8. package/src/lib/Main.js +1 -0
  9. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -0
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -0
  11. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -0
  12. package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -0
  13. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -0
  14. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -0
  15. package/src/lib/components/Captcha/Captcha.cjs +1 -0
  16. package/src/lib/components/Captcha/Captcha.js +1 -0
  17. package/src/lib/components/Divider/Divider.cjs +1 -0
  18. package/src/lib/components/Divider/Divider.js +1 -0
  19. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +1 -0
  20. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +1 -0
  21. package/src/lib/components/EmailForm/EmailForm.cjs +1 -0
  22. package/src/lib/components/EmailForm/EmailForm.js +1 -0
  23. package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -0
  24. package/src/lib/components/LogoutButton/LogoutButton.js +1 -0
  25. package/src/lib/components/Modal/Modal.cjs +1 -0
  26. package/src/lib/components/Modal/Modal.js +1 -0
  27. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +1 -0
  28. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +1 -0
  29. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +12 -40
  30. package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +2 -6
  31. package/src/lib/components/NetworkPicker/NetworkPicker.js +13 -41
  32. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -0
  33. package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -0
  34. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.cjs +6 -8
  35. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -4
  36. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.js +6 -8
  37. package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.cjs +1 -0
  38. package/src/lib/components/NetworkPicker/components/NetworkControlSkeleton/NetworkControlSkeleton.js +1 -0
  39. package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.cjs +67 -0
  40. package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.d.ts +14 -0
  41. package/src/lib/components/NetworkPicker/components/NetworkDropdown/NetworkDropdown.js +63 -0
  42. package/src/lib/components/NetworkPicker/components/NetworkDropdown/index.d.ts +1 -0
  43. package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.cjs → NetworkSwitchControl/NetworkSwitchControl.cjs} +28 -36
  44. package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/NetworkSwitchControl.d.ts +16 -0
  45. package/src/lib/components/NetworkPicker/components/{EvmNetworkControl/EvmNetworkControl.js → NetworkSwitchControl/NetworkSwitchControl.js} +28 -35
  46. package/src/lib/components/NetworkPicker/components/NetworkSwitchControl/index.d.ts +1 -0
  47. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -0
  48. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -0
  49. package/src/lib/components/OverlayCardBase/OverlayCardBase.cjs +1 -0
  50. package/src/lib/components/OverlayCardBase/OverlayCardBase.js +1 -0
  51. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -0
  52. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -0
  53. package/src/lib/components/PhoneNumberField/PhoneNumberField.cjs +1 -0
  54. package/src/lib/components/PhoneNumberField/PhoneNumberField.js +1 -0
  55. package/src/lib/components/Portal/Portal.cjs +4 -2
  56. package/src/lib/components/Portal/Portal.js +4 -2
  57. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -0
  58. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -0
  59. package/src/lib/components/QRCode/QRCode.cjs +1 -0
  60. package/src/lib/components/QRCode/QRCode.js +1 -0
  61. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +1 -0
  62. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +1 -0
  63. package/src/lib/components/QrCodeWrapper/QrCodeWrapper.cjs +1 -0
  64. package/src/lib/components/QrCodeWrapper/QrCodeWrapper.js +1 -0
  65. package/src/lib/components/RenderView/RenderView.cjs +1 -0
  66. package/src/lib/components/RenderView/RenderView.js +1 -0
  67. package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.cjs +1 -0
  68. package/src/lib/components/RetrySendVerificationCodeSection/RetrySendVerificationCodeSection.js +1 -0
  69. package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.cjs +1 -0
  70. package/src/lib/components/SandboxIndicatorWrapper/SandboxIndicatorWrapper.js +1 -0
  71. package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.cjs +1 -0
  72. package/src/lib/components/SecureEmbeddedWalletCard/SecureEmbeddedWalletCard.js +1 -0
  73. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -0
  74. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -0
  75. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -0
  76. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -0
  77. package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.cjs +1 -0
  78. package/src/lib/components/SendBalancePageLayout/components/TokensBalanceDropdown/TokensBalanceDropdown.js +1 -0
  79. package/src/lib/components/ShadowDOM/ShadowDOM.cjs +1 -0
  80. package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -0
  81. package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -0
  82. package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -0
  83. package/src/lib/components/SyncAuthFlow/SyncAuthFlow.cjs +1 -0
  84. package/src/lib/components/SyncAuthFlow/SyncAuthFlow.js +1 -0
  85. package/src/lib/components/Toolkit/Toolkit.cjs +1 -0
  86. package/src/lib/components/Toolkit/Toolkit.js +1 -0
  87. package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +1 -0
  88. package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +1 -0
  89. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -0
  90. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -0
  91. package/src/lib/components/Tooltip/Tooltip.cjs +1 -0
  92. package/src/lib/components/Tooltip/Tooltip.js +1 -0
  93. package/src/lib/components/TosAndPp/TosAndPp.cjs +1 -0
  94. package/src/lib/components/TosAndPp/TosAndPp.js +1 -0
  95. package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +1 -0
  96. package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +1 -0
  97. package/src/lib/components/TransactionCard/TransactionCard.cjs +1 -0
  98. package/src/lib/components/TransactionCard/TransactionCard.js +1 -0
  99. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -0
  100. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -0
  101. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -0
  102. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -0
  103. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -0
  104. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -0
  105. package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
  106. package/src/lib/components/UserAddress/UserAddress.js +1 -0
  107. package/src/lib/components/UserProfile/UserProfile.cjs +1 -0
  108. package/src/lib/components/UserProfile/UserProfile.js +1 -0
  109. package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.cjs +1 -0
  110. package/src/lib/components/UserProfile/parts/EditProfileButton/EditProfileButton.js +1 -0
  111. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -0
  112. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -0
  113. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -0
  114. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -0
  115. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -0
  116. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -0
  117. package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -0
  118. package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -0
  119. package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.cjs +1 -0
  120. package/src/lib/components/WalletConnectorEvents/WalletConnectorEvents.js +1 -0
  121. package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.cjs +1 -0
  122. package/src/lib/context/ConnectWithOtpContext/ConnectWithOtpProvider.js +1 -0
  123. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -8
  124. package/src/lib/context/DynamicContext/DynamicContext.js +4 -9
  125. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -0
  126. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -0
  127. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -0
  128. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -0
  129. package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +1 -0
  130. package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +1 -0
  131. package/src/lib/context/LoadingContext/LoadingContext.cjs +1 -0
  132. package/src/lib/context/LoadingContext/LoadingContext.js +1 -0
  133. package/src/lib/context/MockContext/MockContext.cjs +1 -0
  134. package/src/lib/context/MockContext/MockContext.js +1 -0
  135. package/src/lib/context/OnrampContext/OnrampContext.cjs +1 -0
  136. package/src/lib/context/OnrampContext/OnrampContext.js +1 -0
  137. package/src/lib/context/PasskeyContext/PasskeyContext.cjs +1 -0
  138. package/src/lib/context/PasskeyContext/PasskeyContext.js +1 -0
  139. package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +1 -0
  140. package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +1 -0
  141. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -0
  142. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -0
  143. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +1 -0
  144. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +1 -0
  145. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -0
  146. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -0
  147. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +1 -0
  148. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +1 -0
  149. package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -0
  150. package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -0
  151. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -0
  152. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -0
  153. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -0
  154. package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -0
  155. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +1 -0
  156. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +1 -0
  157. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -0
  158. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -0
  159. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -0
  160. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -0
  161. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -0
  162. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -0
  163. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -0
  164. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -0
  165. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -0
  166. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -0
  167. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -0
  168. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -0
  169. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -0
  170. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -0
  171. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -0
  172. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -0
  173. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +2 -0
  174. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +2 -0
  175. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -0
  176. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -0
  177. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -0
  178. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -0
  179. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -0
  180. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -0
  181. package/src/lib/locale/en/translation.cjs +13 -29
  182. package/src/lib/locale/en/translation.d.ts +11 -27
  183. package/src/lib/locale/en/translation.js +13 -29
  184. package/src/lib/modals/AddNetworkModal/AddNetworkModal.cjs +1 -0
  185. package/src/lib/modals/AddNetworkModal/AddNetworkModal.js +1 -0
  186. package/src/lib/modals/ConfirmationModal/ConfirmationModal.cjs +1 -0
  187. package/src/lib/modals/ConfirmationModal/ConfirmationModal.js +1 -0
  188. package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -0
  189. package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -0
  190. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -0
  191. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -0
  192. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -0
  193. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -0
  194. package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.cjs +2 -1
  195. package/src/lib/modals/SyncWalletPromptModal/SyncWalletPromptModal.js +2 -1
  196. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -0
  197. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -0
  198. package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -0
  199. package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -0
  200. package/src/lib/shared/assets/index.d.ts +1 -0
  201. package/src/lib/shared/assets/{currency.cjs → wallet-with-sunglasses.cjs} +14 -26
  202. package/src/lib/shared/assets/wallet-with-sunglasses.js +34 -0
  203. package/src/lib/store/index.d.ts +1 -0
  204. package/src/lib/store/state/nonce/nonce.cjs +1 -0
  205. package/src/lib/store/state/nonce/nonce.js +1 -0
  206. package/src/lib/store/state/projectSettings/projectSettings.cjs +1 -0
  207. package/src/lib/store/state/projectSettings/projectSettings.js +1 -0
  208. package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.cjs +13 -0
  209. package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.d.ts +2 -0
  210. package/src/lib/store/utils/didStoreVersionChanged/didStoreVersionChanged.js +8 -0
  211. package/src/lib/store/utils/didStoreVersionChanged/index.d.ts +1 -0
  212. package/src/lib/styles/index.shadow.cjs +1 -1
  213. package/src/lib/styles/index.shadow.js +1 -1
  214. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs +2 -4
  215. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.d.ts +2 -2
  216. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.js +2 -4
  217. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -0
  218. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -0
  219. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -0
  220. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -0
  221. package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +1 -0
  222. package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +1 -0
  223. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -0
  224. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -0
  225. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -0
  226. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -0
  227. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -0
  228. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -0
  229. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
  230. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
  231. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +1 -0
  232. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +1 -0
  233. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -0
  234. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -0
  235. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +1 -0
  236. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +1 -0
  237. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -1
  238. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.d.ts +1 -0
  239. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -1
  240. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +1 -0
  241. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +1 -0
  242. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +1 -0
  243. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +1 -0
  244. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -0
  245. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -0
  246. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +1 -0
  247. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +1 -0
  248. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.cjs +1 -0
  249. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useSecureEnclaveEmbeddedWallet.js +1 -0
  250. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +1 -0
  251. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +1 -0
  252. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +1 -0
  253. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +1 -0
  254. package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +1 -0
  255. package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +1 -0
  256. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -0
  257. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +1 -0
  258. package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.cjs +1 -0
  259. package/src/lib/utils/hooks/useFundWithWallet/useFund/useFund.js +1 -0
  260. package/src/lib/utils/hooks/useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.cjs +1 -0
  261. package/src/lib/utils/hooks/useFundWithWallet/usePromptAmountAndFundWithWallet/usePromptAmountAndFundWithWallet.js +1 -0
  262. package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.cjs +1 -0
  263. package/src/lib/utils/hooks/useHandleAuthenticatedUser/useHandleAuthenticatedUser.js +1 -0
  264. package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.cjs +1 -0
  265. package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.js +1 -0
  266. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +1 -0
  267. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +1 -0
  268. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +1 -0
  269. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +1 -0
  270. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -0
  271. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -0
  272. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +1 -0
  273. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +1 -0
  274. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -0
  275. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -0
  276. package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +1 -0
  277. package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +1 -0
  278. package/src/lib/utils/hooks/useMfa/useMfa.cjs +5 -0
  279. package/src/lib/utils/hooks/useMfa/useMfa.js +5 -0
  280. package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +24 -7
  281. package/src/lib/utils/hooks/useMfaModals/useMfaModals.d.ts +1 -0
  282. package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +24 -7
  283. package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.cjs +1 -0
  284. package/src/lib/utils/hooks/useNetworkDataFromWallet/useNetworkDataFromWallet.js +1 -0
  285. package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +1 -0
  286. package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +1 -0
  287. package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +1 -0
  288. package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +1 -0
  289. package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.cjs +1 -0
  290. package/src/lib/utils/hooks/useOpenFundingOptions/useOpenFundingOptions.js +1 -0
  291. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +1 -0
  292. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +1 -0
  293. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +1 -0
  294. package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +1 -0
  295. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +1 -0
  296. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -0
  297. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +1 -0
  298. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +1 -0
  299. package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +1 -0
  300. package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +1 -0
  301. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -0
  302. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -0
  303. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -0
  304. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -0
  305. package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs +1 -0
  306. package/src/lib/utils/hooks/useSubdomainCheck/useSubdomainCheck.js +1 -0
  307. package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -0
  308. package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -0
  309. package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.cjs +1 -0
  310. package/src/lib/utils/hooks/useSyncEmbeddedWalletFlow/useSyncEmbeddedWalletFlow.js +1 -0
  311. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +1 -0
  312. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +1 -0
  313. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +1 -0
  314. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +1 -0
  315. package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs +1 -0
  316. package/src/lib/utils/hooks/useTelegramLogin/useTelegramLogin.js +1 -0
  317. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.cjs +1 -0
  318. package/src/lib/utils/hooks/useTokenBalances/useTokenBalances.js +1 -0
  319. package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.cjs +1 -0
  320. package/src/lib/utils/hooks/useTransactionSimulation/classes/useBaseTransactionSimulation.js +1 -0
  321. package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.cjs +1 -0
  322. package/src/lib/utils/hooks/useTransferWallet/useTransferWallet.js +1 -0
  323. package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs +1 -0
  324. package/src/lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js +1 -0
  325. package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +1 -0
  326. package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +1 -0
  327. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +1 -0
  328. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +1 -0
  329. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -0
  330. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -0
  331. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.cjs +10 -3
  332. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.d.ts +1 -3
  333. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.js +10 -3
  334. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +6 -3
  335. package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +1 -3
  336. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +6 -3
  337. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -0
  338. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -0
  339. package/src/lib/utils/hooks/useViewSettings/useViewSettings.cjs +1 -0
  340. package/src/lib/utils/hooks/useViewSettings/useViewSettings.js +1 -0
  341. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +1 -0
  342. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +1 -0
  343. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -0
  344. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -0
  345. package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +1 -0
  346. package/src/lib/utils/hooks/useWalletList/useWalletList.js +1 -0
  347. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +1 -0
  348. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +1 -0
  349. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -1
  350. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -1
  351. package/src/lib/views/AccessBlockedView/AccessBlockedView.cjs +1 -0
  352. package/src/lib/views/AccessBlockedView/AccessBlockedView.js +1 -0
  353. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -0
  354. package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -0
  355. package/src/lib/views/AddNetworkView/AddNetworkView.cjs +1 -0
  356. package/src/lib/views/AddNetworkView/AddNetworkView.js +1 -0
  357. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -0
  358. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -0
  359. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -0
  360. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -0
  361. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -0
  362. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -0
  363. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -0
  364. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -0
  365. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +3 -4
  366. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +3 -4
  367. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -0
  368. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -0
  369. package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.cjs +1 -0
  370. package/src/lib/views/CollectUserDataView/UserDataFields/UserField/UserField.js +1 -0
  371. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +1 -0
  372. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +1 -0
  373. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.cjs +1 -0
  374. package/src/lib/views/CollectUserDataViewNoWallet/CollectUserDataViewNoWallet.js +1 -0
  375. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -0
  376. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -0
  377. package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
  378. package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
  379. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -0
  380. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -0
  381. package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.cjs +1 -0
  382. package/src/lib/views/EmbeddedDeleteView/EmbeddedDeleteView.js +1 -0
  383. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +1 -0
  384. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +1 -0
  385. package/src/lib/views/FarcasterConnectView/FarcasterConnectView.cjs +1 -0
  386. package/src/lib/views/FarcasterConnectView/FarcasterConnectView.js +1 -0
  387. package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.cjs +1 -0
  388. package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.js +1 -0
  389. package/src/lib/views/GlobalWalletMaliciousView/GlobalWalletMaliciousView.cjs +1 -0
  390. package/src/lib/views/GlobalWalletMaliciousView/GlobalWalletMaliciousView.js +1 -0
  391. package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.cjs +1 -0
  392. package/src/lib/views/LoginView/LoginViewSection/LoginViewSection.js +1 -0
  393. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -0
  394. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -0
  395. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs +1 -0
  396. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js +1 -0
  397. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +1 -0
  398. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +1 -0
  399. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -0
  400. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -0
  401. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -0
  402. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -0
  403. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +1 -0
  404. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +1 -0
  405. package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.cjs +1 -0
  406. package/src/lib/views/LoginView/sections/ToggleableSection/ToggleableSection.js +1 -0
  407. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -0
  408. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -0
  409. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -0
  410. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -0
  411. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -0
  412. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -0
  413. package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +1 -0
  414. package/src/lib/views/LoginView/useLoginView/useLoginView.js +1 -0
  415. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.cjs +1 -0
  416. package/src/lib/views/MergeUserAccountsConflictsView/MergeUserAccountsConflictsView.js +1 -0
  417. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -0
  418. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -0
  419. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +1 -0
  420. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +1 -0
  421. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +2 -1
  422. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +2 -1
  423. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -0
  424. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -0
  425. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.cjs +1 -0
  426. package/src/lib/views/MfaRecoveryView/MfaRecoveryView.js +1 -0
  427. package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.cjs +1 -0
  428. package/src/lib/views/MfaSecureDeviceHelpView/MfaSecureDeviceHelpView.js +1 -0
  429. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +1 -0
  430. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +1 -0
  431. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +1 -0
  432. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +1 -0
  433. package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.cjs +1 -0
  434. package/src/lib/views/MobileWalletRedirectView/MobileWalletRedirectView.js +1 -0
  435. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -4
  436. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -4
  437. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
  438. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
  439. package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
  440. package/src/lib/views/NoAccess/NoAccess.js +1 -0
  441. package/src/lib/views/NoAccess/useNoAccessText.cjs +1 -0
  442. package/src/lib/views/NoAccess/useNoAccessText.js +1 -0
  443. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
  444. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
  445. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -0
  446. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -0
  447. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +1 -0
  448. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +1 -0
  449. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +1 -0
  450. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +1 -0
  451. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +1 -0
  452. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +1 -0
  453. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +1 -0
  454. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +1 -0
  455. package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +1 -0
  456. package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +1 -0
  457. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +1 -0
  458. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +1 -0
  459. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +1 -0
  460. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +1 -0
  461. package/src/lib/views/Passkey/PasskeyRecovery/AddRecoveryEmail/AddRecoveryEmail.cjs +1 -0
  462. package/src/lib/views/Passkey/PasskeyRecovery/AddRecoveryEmail/AddRecoveryEmail.js +1 -0
  463. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +1 -0
  464. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +1 -0
  465. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +1 -0
  466. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +1 -0
  467. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +1 -0
  468. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +1 -0
  469. package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +1 -0
  470. package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +1 -0
  471. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
  472. package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
  473. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
  474. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
  475. package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
  476. package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
  477. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +1 -0
  478. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +1 -0
  479. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -0
  480. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -0
  481. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
  482. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
  483. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
  484. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
  485. package/src/lib/views/SmsVerification/SmsVerification.cjs +1 -0
  486. package/src/lib/views/SmsVerification/SmsVerification.js +1 -0
  487. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +1 -0
  488. package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +1 -0
  489. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -0
  490. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -0
  491. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -0
  492. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -0
  493. package/src/lib/views/SubdomainField/SubdomainField.cjs +1 -0
  494. package/src/lib/views/SubdomainField/SubdomainField.js +1 -0
  495. package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.cjs +1 -0
  496. package/src/lib/views/SyncWalletView/AutoReconnectingView/AutoReconnectingView.js +1 -0
  497. package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.cjs +1 -0
  498. package/src/lib/views/SyncWalletView/ReconnectWithQrCodeView/ReconnectWithQrCodeView.js +1 -0
  499. package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.cjs +1 -0
  500. package/src/lib/views/SyncWalletView/SwitchWalletView/SwitchWalletView.js +1 -0
  501. package/src/lib/views/SyncWalletView/SyncWalletView.cjs +1 -0
  502. package/src/lib/views/SyncWalletView/SyncWalletView.js +1 -0
  503. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
  504. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
  505. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -0
  506. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -0
  507. package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +1 -0
  508. package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +1 -0
  509. package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.cjs +1 -0
  510. package/src/lib/views/WalletAlreadyExistsView/WalletAlreadyExistsView.js +1 -0
  511. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -0
  512. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -0
  513. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -0
  514. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -0
  515. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -0
  516. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -0
  517. package/src/lib/views/WalletList/WalletList.cjs +1 -0
  518. package/src/lib/views/WalletList/WalletList.js +1 -0
  519. package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.cjs +1 -0
  520. package/src/lib/views/WalletList/WalletListGridTabs/WalletListGridTabs.js +1 -0
  521. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
  522. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
  523. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -0
  524. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -0
  525. package/src/lib/views/WalletRedirectView/WalletRedirectView.cjs +1 -0
  526. package/src/lib/views/WalletRedirectView/WalletRedirectView.js +1 -0
  527. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
  528. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
  529. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
  530. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
  531. package/src/lib/views/viewToComponentMap.cjs +1 -0
  532. package/src/lib/views/viewToComponentMap.js +1 -0
  533. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -0
  534. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -0
  535. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -0
  536. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -0
  537. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -0
  538. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -0
  539. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -0
  540. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -0
  541. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -0
  542. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -0
  543. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +1 -0
  544. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +1 -0
  545. package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +1 -0
  546. package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +1 -0
  547. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -0
  548. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -0
  549. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -0
  550. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -0
  551. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -0
  552. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -0
  553. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -0
  554. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -0
  555. package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.cjs +1 -0
  556. package/src/lib/widgets/DynamicMultiWalletPromptsWidget/DynamicMultiWalletPromptsWidget.js +1 -0
  557. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -0
  558. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -0
  559. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
  560. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
  561. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +1 -0
  562. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +1 -0
  563. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +1 -0
  564. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +1 -0
  565. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +7 -9
  566. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +8 -10
  567. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.cjs +1 -0
  568. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceItem/TokenBalanceItem.js +1 -0
  569. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.cjs +1 -0
  570. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/TokenBalanceList/TokenBalanceList.js +1 -0
  571. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -0
  572. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -0
  573. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.cjs +1 -0
  574. package/src/lib/widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js +1 -0
  575. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -0
  576. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -0
  577. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +3 -6
  578. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +3 -6
  579. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -0
  580. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -0
  581. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -0
  582. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -0
  583. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
  584. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
  585. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -0
  586. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -0
  587. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -0
  588. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -0
  589. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +1 -0
  590. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +1 -0
  591. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +1 -0
  592. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -0
  593. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -0
  594. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -0
  595. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -0
  596. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -0
  597. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -0
  598. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -0
  599. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -0
  600. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +1 -0
  601. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +1 -0
  602. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -0
  603. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -0
  604. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -0
  605. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -0
  606. package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.cjs +1 -0
  607. package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.js +1 -0
  608. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -0
  609. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -0
  610. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -0
  611. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -0
  612. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +4 -1
  613. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
  614. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +4 -1
  615. package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +1 -0
  616. package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +1 -0
  617. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -0
  618. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -0
  619. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -0
  620. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -0
  621. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +1 -0
  622. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -0
  623. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -0
  624. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -0
  625. package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +1 -0
  626. package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +1 -0
  627. package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +1 -0
  628. package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +1 -0
  629. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -0
  630. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -0
  631. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -0
  632. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -0
  633. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
  634. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
  635. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -0
  636. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -0
  637. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -0
  638. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -0
  639. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
  640. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
  641. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
  642. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
  643. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
  644. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
  645. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
  646. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
  647. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +1 -0
  648. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +1 -0
  649. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
  650. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
  651. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
  652. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
  653. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -0
  654. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -0
  655. package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs +1 -0
  656. package/src/lib/widgets/DynamicWidget/views/ChooseOnrampProviderView/ChooseOnrampProviderView.js +1 -0
  657. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.cjs +1 -0
  658. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useFundingMethods.js +1 -0
  659. package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.cjs +1 -0
  660. package/src/lib/widgets/DynamicWidget/views/ConnectedAppsView/ConnectedAppsView.js +1 -0
  661. package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.cjs +1 -0
  662. package/src/lib/widgets/DynamicWidget/views/DepositView/DepositView.js +1 -0
  663. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -0
  664. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -0
  665. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +1 -0
  666. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +1 -0
  667. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +3 -2
  668. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +3 -2
  669. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.cjs +2 -4
  670. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.d.ts +1 -3
  671. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/components/utils/sort.js +3 -3
  672. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -0
  673. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -0
  674. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -0
  675. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -0
  676. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.cjs +99 -49
  677. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/ReceiveExternalWalletFunds.js +95 -45
  678. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.cjs +22 -10
  679. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.d.ts +2 -0
  680. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenOption/TokenOption.js +22 -10
  681. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.cjs +4 -3
  682. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.d.ts +2 -0
  683. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/TokenSelectScreen/TokenSelectScreen.js +4 -3
  684. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/types.d.ts +2 -0
  685. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.cjs +27 -0
  686. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.d.ts +2 -0
  687. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/calculateFiatBalance.js +23 -0
  688. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/calculateFiatBalance/index.d.ts +1 -0
  689. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.cjs +4 -0
  690. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/convert/convert.js +4 -0
  691. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.cjs +33 -0
  692. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.d.ts +8 -0
  693. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/convertScientificToDecimal.js +29 -0
  694. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/convertScientificToDecimal/index.d.ts +1 -0
  695. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.cjs +26 -27
  696. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.d.ts +6 -0
  697. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/formatValue/formatValue.js +26 -27
  698. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.cjs +2 -0
  699. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.d.ts +1 -0
  700. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/isFiatToken/isFiatToken.js +2 -1
  701. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/index.d.ts +1 -0
  702. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.cjs +32 -0
  703. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.d.ts +9 -0
  704. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useExchangeRatesForFunding/useExchangeRatesForFunding.js +28 -0
  705. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.cjs +28 -15
  706. package/src/lib/widgets/DynamicWidget/views/ReceiveExternalWalletFunds/utils/useTokensForFunding/useTokensForFunding.js +28 -15
  707. package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.cjs +20 -0
  708. package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.d.ts +2 -0
  709. package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/EmptyScreen.js +16 -0
  710. package/src/lib/widgets/DynamicWidget/views/SettingsView/EmptyScreen/index.d.ts +1 -0
  711. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.cjs +4 -6
  712. package/src/lib/widgets/DynamicWidget/views/SettingsView/SettingsView.js +4 -6
  713. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -0
  714. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -0
  715. package/src/lib/widgets/OnrampWidget/OnrampWidget.cjs +1 -0
  716. package/src/lib/widgets/OnrampWidget/OnrampWidget.js +1 -0
  717. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +0 -23
  718. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/index.d.ts +0 -1
  719. package/src/lib/shared/assets/currency.js +0 -46
@@ -47,7 +47,6 @@ require('../../../../utils/functions/compareChains/compareChains.cjs');
47
47
  require('../../../../context/ThemeContext/ThemeContext.cjs');
48
48
  require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
49
49
  require('bs58');
50
- var usePromise = require('../../../../utils/hooks/usePromise/usePromise.cjs');
51
50
  require('@dynamic-labs/types');
52
51
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
53
52
  require('../../../../context/LoadingContext/LoadingContext.cjs');
@@ -60,6 +59,7 @@ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
60
59
  require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
61
60
  require('@dynamic-labs/rpc-providers');
62
61
  require('../../../../store/state/loadingAndLifecycle.cjs');
62
+ require('@dynamic-labs/store');
63
63
  require('../../../../store/state/walletOptions/walletOptions.cjs');
64
64
  var Typography = require('../../../../components/Typography/Typography.cjs');
65
65
  require('../../../../context/FooterAnimationContext/index.cjs');
@@ -77,6 +77,7 @@ var Icon = require('../../../../components/Icon/Icon.cjs');
77
77
  var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
78
78
  var IconButton = require('../../../../components/IconButton/IconButton.cjs');
79
79
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
80
+ var Image = require('../../../../components/Image/Image.cjs');
80
81
  var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
81
82
  require('formik');
82
83
  require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
@@ -102,7 +103,6 @@ require('../../../../components/InlineWidget/InlineWidget.cjs');
102
103
  require('../../../../components/IsBrowser/IsBrowser.cjs');
103
104
  require('../../../../components/Popper/Popper/Popper.cjs');
104
105
  require('../../../../components/Popper/PopperContext/PopperContext.cjs');
105
- var exchangeRates = require('../../../../data/api/exchangeRates/exchangeRates.cjs');
106
106
  var FormattedInput = require('./FormattedInput/FormattedInput.cjs');
107
107
  var formattedInputEmitter = require('./FormattedInput/formattedInputEmitter.cjs');
108
108
  var TokenSelectScreen = require('./TokenSelectScreen/TokenSelectScreen.cjs');
@@ -112,8 +112,10 @@ var formatValue = require('./utils/formatValue/formatValue.cjs');
112
112
  var isFiatToken = require('./utils/isFiatToken/isFiatToken.cjs');
113
113
  var isNonZero = require('./utils/isNonZero/isNonZero.cjs');
114
114
  var respectsMinimum = require('./utils/respectsMinimum/respectsMinimum.cjs');
115
+ var useExchangeRatesForFunding = require('./utils/useExchangeRatesForFunding/useExchangeRatesForFunding.cjs');
115
116
  var useSubmitExternalWalletFunding = require('./utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.cjs');
116
117
  var useTokensForFunding = require('./utils/useTokensForFunding/useTokensForFunding.cjs');
118
+ var calculateFiatBalance = require('./utils/calculateFiatBalance/calculateFiatBalance.cjs');
117
119
 
118
120
  const defaultQuickSuggestions = {
119
121
  token: 'USD',
@@ -123,7 +125,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
123
125
  const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
124
126
  const inputEmitter = formattedInputEmitter.createFormattedInputEmitter();
125
127
  const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
126
- var _a, _b, _c, _d, _e, _f, _g;
128
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
127
129
  // For now we hardcode the default value, soon we will fetch this from project settings
128
130
  const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
129
131
  rule: 'recommended',
@@ -146,10 +148,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
146
148
  const { isLoading: tokenBalancesLoading, tokens: tokenBalances } = useTokensForFunding.useTokensForFunding({
147
149
  wallet: externalWallet,
148
150
  });
149
- const { data: exchangeRates$1 } = usePromise.usePromise(exchangeRates.getExchangeRates, {
150
- initialData: {},
151
+ const exchangeRates = useExchangeRatesForFunding.useExchangeRatesForFunding({
151
152
  // Initialize amounts after exchange rates are fetched
152
- onResolve: (exchangeRates) => {
153
+ onFetch: (exchangeRates) => {
153
154
  if (tokenAmount === undefined && fiatAmount !== undefined) {
154
155
  setTokenAmount(convert.convertFromFiat(fiatAmount, tokenSymbol, exchangeRates));
155
156
  }
@@ -157,39 +158,46 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
157
158
  setFiatAmount(convert.convertToFiat(tokenAmount, tokenSymbol, exchangeRates));
158
159
  }
159
160
  },
161
+ tokenBalances,
160
162
  });
161
163
  const [tokenAmount, setTokenAmount] = React.useState(isInitialAmountValueForToken
162
164
  ? (_a = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _a !== void 0 ? _a : ''
163
- : convert.convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates$1));
165
+ : convert.convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates));
164
166
  const [tokenSymbol, _setTokenSymbol] = React.useState(initialToken.value);
165
- const setTokenSymbol = (symbol) => {
167
+ const [fiatAmount, setFiatAmount] = React.useState(isInitialAmountValueForToken
168
+ ? convert.convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
169
+ : (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
170
+ const setTokenSymbol = React.useCallback((symbol) => {
166
171
  setHasUserInteracted(true);
167
172
  _setTokenSymbol(symbol);
168
173
  if (fiatAmount)
169
- setTokenAmount(convert.convertFromFiat(fiatAmount, symbol, exchangeRates$1));
170
- };
171
- const [fiatAmount, setFiatAmount] = React.useState(isInitialAmountValueForToken
172
- ? convert.convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates$1)
173
- : (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
174
+ setTokenAmount(convert.convertFromFiat(fiatAmount, symbol, exchangeRates));
175
+ }, [fiatAmount, exchangeRates]);
174
176
  // When we eventually allow changing this, add setter as _setFiatSymbol
175
177
  // And then create a setFiatSymbol function similar to how we have setTokenSymbol
176
178
  const [fiatSymbol] = React.useState('USD');
177
- const setAmountsByTokenValue = (amount) => {
179
+ const setAmountsByTokenValue = React.useCallback((amount) => {
178
180
  setTokenAmount(amount);
179
- setFiatAmount(convert.convertToFiat(amount, tokenSymbol, exchangeRates$1));
180
- };
181
- const setAmountsByFiatValue = (amount) => {
181
+ setFiatAmount(convert.convertToFiat(amount, tokenSymbol, exchangeRates));
182
+ }, [tokenSymbol, exchangeRates]);
183
+ const setAmountsByFiatValue = React.useCallback((amount) => {
182
184
  setFiatAmount(amount);
183
- setTokenAmount(convert.convertFromFiat(amount, tokenSymbol, exchangeRates$1));
184
- };
185
+ setTokenAmount(convert.convertFromFiat(amount, tokenSymbol, exchangeRates));
186
+ }, [tokenSymbol, exchangeRates]);
185
187
  const [showTokenAsPrimary, setShowTokenAsPrimary] = React.useState(false);
186
- const switchPrimaryAndSecondary = () => {
188
+ const switchPrimaryAndSecondary = React.useCallback(() => {
187
189
  setHasUserInteracted(true);
188
190
  setShowTokenAsPrimary(!showTokenAsPrimary);
191
+ if (tokenAmount && isNaN(parseFloat(tokenAmount))) {
192
+ setTokenAmount('');
193
+ }
194
+ if (fiatAmount && isNaN(parseFloat(fiatAmount))) {
195
+ setFiatAmount('');
196
+ }
189
197
  inputEmitter.emit('focus');
190
- };
198
+ }, [fiatAmount, showTokenAsPrimary, tokenAmount]);
191
199
  const isMinimumRespected = minimum
192
- ? respectsMinimum.respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates$1)
200
+ ? respectsMinimum.respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates)
193
201
  : true;
194
202
  const [primaryData, secondaryData] = showTokenAsPrimary
195
203
  ? [
@@ -208,17 +216,17 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
208
216
  },
209
217
  { amount: tokenAmount, symbol: tokenSymbol },
210
218
  ];
211
- const secondaryDisplayHasFixedZeros = isFiatToken.isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
212
219
  const secondaryDisplay = formatValue.formatValue({
220
+ maxDecimals: isFiatToken.isFiatOrStablecoin(secondaryData.symbol) ? 2 : undefined,
213
221
  symbol: secondaryData.symbol,
214
222
  value: secondaryData.amount,
215
- withFixedZeros: secondaryDisplayHasFixedZeros,
223
+ withFixedZeros: isFiatToken.isFiatOrStablecoin(secondaryData.symbol),
216
224
  });
217
225
  const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
218
226
  ? { token: 'USD', values: quickSuggestions }
219
227
  : quickSuggestions;
220
228
  const quickSuggestionsParsed = quickSuggestionsWithToken.values
221
- .filter((value) => respectsMinimum.respectsMinimum({ token: quickSuggestionsWithToken.token, value: value.toString() }, minimum, exchangeRates$1))
229
+ .filter((value) => respectsMinimum.respectsMinimum({ token: quickSuggestionsWithToken.token, value: value.toString() }, minimum, exchangeRates))
222
230
  .map((value) => ({
223
231
  display: formatValue.formatValue({
224
232
  symbol: quickSuggestionsWithToken.token,
@@ -227,10 +235,33 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
227
235
  value,
228
236
  }))
229
237
  .filter(({ display }) => display !== undefined);
230
- const balanceNumber = (_e = (_d = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol)) === null || _d === void 0 ? void 0 : _d.balance) !== null && _e !== void 0 ? _e : 0;
231
- const showNotEnoughBalance = Boolean(isNonZero.isNonZero(tokenAmount) &&
232
- tokenAmount !== undefined &&
233
- balanceNumber < parseFloat(tokenAmount));
238
+ const currentToken = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol);
239
+ const fiatBalance = calculateFiatBalance.calculateFiatBalance(currentToken, exchangeRates);
240
+ const [primaryBalance, secondaryBalance] = showTokenAsPrimary
241
+ ? [
242
+ {
243
+ symbol: tokenSymbol,
244
+ value: (_d = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _d !== void 0 ? _d : 0,
245
+ },
246
+ {
247
+ symbol: fiatSymbol,
248
+ value: fiatBalance,
249
+ },
250
+ ]
251
+ : [
252
+ {
253
+ symbol: fiatSymbol,
254
+ value: fiatBalance,
255
+ },
256
+ {
257
+ symbol: tokenSymbol,
258
+ value: (_e = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _e !== void 0 ? _e : 0,
259
+ },
260
+ ];
261
+ const showNotEnoughBalance = Boolean(!currentToken ||
262
+ (isNonZero.isNonZero(tokenAmount) &&
263
+ tokenAmount !== undefined &&
264
+ currentToken.balance < parseFloat(tokenAmount)));
234
265
  const showMinimumRequired = Boolean(!isMinimumRespected && !showNotEnoughBalance);
235
266
  const showQuickSuggestions = quickSuggestionsParsed.length > 0 &&
236
267
  !hasUserInteracted &&
@@ -239,62 +270,81 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
239
270
  isFiatToken.isFiatToken(quickSuggestionsWithToken.token));
240
271
  const disableTokenSelect = rulesThatDisableTokenSelect.includes(initialToken.rule);
241
272
  const [showTokenSelect, setShowTokenSelect] = React.useState(false);
242
- const handleSelectToken = (token) => {
273
+ const handleSelectToken = React.useCallback((token) => {
243
274
  setTokenSymbol(token);
244
275
  setShowTokenSelect(false);
245
- };
246
- const handleQuickSuggestion = (value) => {
276
+ }, [setTokenSymbol]);
277
+ const handleQuickSuggestion = React.useCallback((value) => {
247
278
  setHasUserInteracted(true);
248
279
  if (isFiatToken.isFiatToken(quickSuggestionsWithToken.token))
249
280
  setAmountsByFiatValue(value.toString());
250
281
  else
251
282
  setAmountsByTokenValue(value.toString());
252
283
  inputEmitter.emit('focus');
253
- };
284
+ }, [
285
+ quickSuggestionsWithToken.token,
286
+ setAmountsByFiatValue,
287
+ setAmountsByTokenValue,
288
+ ]);
254
289
  const handleSubmit = useSubmitExternalWalletFunding.useSubmitExternalWalletFunding();
290
+ const disableSubmit = !isMinimumRespected || showNotEnoughBalance || !isNonZero.isNonZero(tokenAmount);
291
+ const closeTokenSelect = React.useCallback(() => {
292
+ setShowTokenSelect(false);
293
+ inputEmitter.emit('focus');
294
+ }, []);
255
295
  const grayOutSecondaryDisplay = !isNonZero.isNonZero(secondaryData.amount) ||
256
- (secondaryDisplayHasFixedZeros &&
296
+ (isFiatToken.isFiatOrStablecoin(secondaryData.symbol) &&
257
297
  parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
258
298
  const inputSymbolProp = primaryData.symbol === 'USD'
259
299
  ? { leading: '$' }
260
300
  : { trailing: primaryData.symbol };
261
301
  const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }));
262
- return (jsxRuntime.jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsxRuntime.jsx(TokenSelectScreen.TokenSelectScreen, { onClose: () => setShowTokenSelect(false), onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames.classNames('fund-from-wallet__token-select', {
302
+ return (jsxRuntime.jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsxRuntime.jsx(TokenSelectScreen.TokenSelectScreen, { onClose: closeTokenSelect, onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames.classNames('fund-from-wallet__token-select', {
263
303
  'fund-from-wallet__token-select--open': showTokenSelect,
264
- }) })), jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__minimum-error', {
304
+ }), showTokenAsPrimary: showTokenAsPrimary, exchangeRates: exchangeRates })), jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__minimum-error', {
265
305
  'fund-from-wallet__content__amount-container__minimum-error--visible': showMinimumRequired,
266
- }), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
306
+ }), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
267
307
  minimum: formatValue.formatValue({
268
308
  symbol: minimum.token,
269
309
  value: minimum.value,
270
310
  }),
271
311
  }) })), 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'
272
312
  ? (_g = formatValue.formatValue({
273
- maxDecimals: 8,
313
+ maxDecimals: isFiatToken.isFiatOrStablecoin(primaryData.symbol)
314
+ ? 2
315
+ : 8,
274
316
  symbol: undefined,
275
317
  value: primaryData.amount,
276
- withFixedZeros: isFiatToken.isFiatToken(primaryData.symbol) ||
277
- primaryData.symbol === 'USDC',
318
+ withFixedZeros: isFiatToken.isFiatOrStablecoin(primaryData.symbol),
278
319
  })) !== null && _g !== void 0 ? _g : primaryData.amount
279
320
  : 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: {
280
321
  className: 'fund-from-wallet__content__amount-container__skeleton',
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', {
322
+ } })), 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), weight: 'medium', children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [(currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ? (jsxRuntime.jsx(Image.Image, { dataTestId: 'token-icon', alt: tokenSymbol, src: currentToken.logoURI, className: 'fund-from-wallet__content__token-icon' })) : null, jsxRuntime.jsx(Typography.Typography, { weight: 'medium', className: classNames.classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
282
323
  'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
283
324
  }), 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({
284
325
  symbol: secondaryData.symbol,
285
326
  value: consts.UNAVAILABLE_VALUE,
286
- }) }), jsxRuntime.jsx("div", { ref: setConversionErrorIconRef, children: jsxRuntime.jsx(Icon.Icon, { size: 'medium', color: 'text-tertiary', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }), jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.network_conversion_error'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__balance-error', {
327
+ }) }), jsxRuntime.jsx("div", { ref: setConversionErrorIconRef, children: jsxRuntime.jsx(Icon.Icon, { size: 'medium', color: 'text-tertiary', children: jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }), jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.pricing_unavailable'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsxRuntime.jsx(Typography.Typography, { color: 'error-1', className: classNames.classNames('fund-from-wallet__content__amount-container__balance-error', {
287
328
  'fund-from-wallet__content__amount-container__balance-error--visible': showNotEnoughBalance,
288
- }), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsxRuntime.jsx(walletBook.WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', children: shortenWalletAddress.shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsxRuntime.jsx(Skeleton.Skeleton, { dataTestId: 'balance-skeleton', container: {
329
+ }), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsxRuntime.jsx(walletBook.WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', weight: 'medium', children: shortenWalletAddress.shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsxRuntime.jsx(Skeleton.Skeleton, { dataTestId: 'balance-skeleton', container: {
289
330
  className: 'fund-from-wallet__content__wallet-card__balance-skeleton',
290
331
  } })), !tokenBalancesLoading && (jsxRuntime.jsxs("div", { className: classNames.classNames('fund-from-wallet__content__wallet-card__balance', {
291
332
  'fund-from-wallet__content__wallet-card__balance--disable-select': disableTokenSelect,
292
- }), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', weight: 'bold', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', "data-testid": `balance-amount-${tokenSymbol}`, children: formatValue.formatValue({
293
- maxDecimals: 8,
294
- symbol: tokenSymbol,
295
- value: balanceNumber,
296
- withFixedZeros: isFiatToken.isFiatToken(tokenSymbol) || tokenSymbol === 'USDC',
297
- }) })] }), !disableTokenSelect && (jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsxRuntime.jsx(chevronDown.ReactComponent, {}) }))] }))] })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: !isMinimumRespected || showNotEnoughBalance || !isNonZero.isNonZero(tokenAmount), onClick: () => handleSubmit({
333
+ }), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxRuntime.jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": `primary-balance-amount-${primaryBalance.symbol}`, weight: 'medium', children: formatValue.formatValue({
334
+ maxDecimals: isFiatToken.isFiatOrStablecoin(primaryBalance.symbol)
335
+ ? 2
336
+ : 6,
337
+ symbol: primaryBalance.symbol,
338
+ value: (_h = primaryBalance.value) !== null && _h !== void 0 ? _h : consts.UNAVAILABLE_VALUE,
339
+ withFixedZeros: isFiatToken.isFiatOrStablecoin(primaryBalance.symbol),
340
+ }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', "data-testid": `secondary-balance-amount-${secondaryBalance.symbol}`, color: 'secondary', weight: 'medium', children: formatValue.formatValue({
341
+ maxDecimals: isFiatToken.isFiatOrStablecoin(secondaryBalance.symbol)
342
+ ? 2
343
+ : 6,
344
+ symbol: secondaryBalance.symbol,
345
+ value: (_j = secondaryBalance.value) !== null && _j !== void 0 ? _j : consts.UNAVAILABLE_VALUE,
346
+ withFixedZeros: isFiatToken.isFiatOrStablecoin(secondaryBalance.symbol),
347
+ }) })] }), !disableTokenSelect && (jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsxRuntime.jsx(chevronDown.ReactComponent, { "data-testid": 'token-select-dropdown' }) }))] }))] })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: disableSubmit, onClick: () => handleSubmit({
298
348
  externalWallet,
299
349
  tokenAmount,
300
350
  tokenBalances,
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { useState } from 'react';
3
+ import { useState, useCallback } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { WalletIcon } from '@dynamic-labs/wallet-book';
6
6
  import { classNames } from '../../../../utils/functions/classNames/classNames.js';
@@ -43,7 +43,6 @@ import '../../../../utils/functions/compareChains/compareChains.js';
43
43
  import '../../../../context/ThemeContext/ThemeContext.js';
44
44
  import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
45
45
  import 'bs58';
46
- import { usePromise } from '../../../../utils/hooks/usePromise/usePromise.js';
47
46
  import '@dynamic-labs/types';
48
47
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
49
48
  import '../../../../context/LoadingContext/LoadingContext.js';
@@ -56,6 +55,7 @@ import '../../../../context/FieldsStateContext/FieldsStateContext.js';
56
55
  import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
57
56
  import '@dynamic-labs/rpc-providers';
58
57
  import '../../../../store/state/loadingAndLifecycle.js';
58
+ import '@dynamic-labs/store';
59
59
  import '../../../../store/state/walletOptions/walletOptions.js';
60
60
  import { Typography } from '../../../../components/Typography/Typography.js';
61
61
  import '../../../../context/FooterAnimationContext/index.js';
@@ -73,6 +73,7 @@ import { Icon } from '../../../../components/Icon/Icon.js';
73
73
  import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
74
74
  import { IconButton } from '../../../../components/IconButton/IconButton.js';
75
75
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
76
+ import { Image } from '../../../../components/Image/Image.js';
76
77
  import { TypographyButton } from '../../../../components/TypographyButton/TypographyButton.js';
77
78
  import 'formik';
78
79
  import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
@@ -98,18 +99,19 @@ import '../../../../components/InlineWidget/InlineWidget.js';
98
99
  import '../../../../components/IsBrowser/IsBrowser.js';
99
100
  import '../../../../components/Popper/Popper/Popper.js';
100
101
  import '../../../../components/Popper/PopperContext/PopperContext.js';
101
- import { getExchangeRates } from '../../../../data/api/exchangeRates/exchangeRates.js';
102
102
  import { FormattedInput } from './FormattedInput/FormattedInput.js';
103
103
  import { createFormattedInputEmitter } from './FormattedInput/formattedInputEmitter.js';
104
104
  import { TokenSelectScreen } from './TokenSelectScreen/TokenSelectScreen.js';
105
105
  import { UNAVAILABLE_VALUE } from './consts.js';
106
106
  import { convertFromFiat, convertToFiat } from './utils/convert/convert.js';
107
107
  import { formatValue } from './utils/formatValue/formatValue.js';
108
- import { isFiatToken } from './utils/isFiatToken/isFiatToken.js';
108
+ import { isFiatOrStablecoin, isFiatToken } from './utils/isFiatToken/isFiatToken.js';
109
109
  import { isNonZero } from './utils/isNonZero/isNonZero.js';
110
110
  import { respectsMinimum } from './utils/respectsMinimum/respectsMinimum.js';
111
+ import { useExchangeRatesForFunding } from './utils/useExchangeRatesForFunding/useExchangeRatesForFunding.js';
111
112
  import { useSubmitExternalWalletFunding } from './utils/useSubmitExternalWalletFunding/useSubmitExternalWalletFunding.js';
112
113
  import { useTokensForFunding } from './utils/useTokensForFunding/useTokensForFunding.js';
114
+ import { calculateFiatBalance } from './utils/calculateFiatBalance/calculateFiatBalance.js';
113
115
 
114
116
  const defaultQuickSuggestions = {
115
117
  token: 'USD',
@@ -119,7 +121,7 @@ const rulesThatHideQuickSuggestions = ['exact', 'minimum'];
119
121
  const rulesThatDisableTokenSelect = ['exact', 'exact-with-amount'];
120
122
  const inputEmitter = createFormattedInputEmitter();
121
123
  const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialTokenRaw, externalWallet, quickSuggestions = defaultQuickSuggestions, }) => {
122
- var _a, _b, _c, _d, _e, _f, _g;
124
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
123
125
  // For now we hardcode the default value, soon we will fetch this from project settings
124
126
  const initialToken = initialTokenRaw !== null && initialTokenRaw !== void 0 ? initialTokenRaw : {
125
127
  rule: 'recommended',
@@ -142,10 +144,9 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
142
144
  const { isLoading: tokenBalancesLoading, tokens: tokenBalances } = useTokensForFunding({
143
145
  wallet: externalWallet,
144
146
  });
145
- const { data: exchangeRates } = usePromise(getExchangeRates, {
146
- initialData: {},
147
+ const exchangeRates = useExchangeRatesForFunding({
147
148
  // Initialize amounts after exchange rates are fetched
148
- onResolve: (exchangeRates) => {
149
+ onFetch: (exchangeRates) => {
149
150
  if (tokenAmount === undefined && fiatAmount !== undefined) {
150
151
  setTokenAmount(convertFromFiat(fiatAmount, tokenSymbol, exchangeRates));
151
152
  }
@@ -153,37 +154,44 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
153
154
  setFiatAmount(convertToFiat(tokenAmount, tokenSymbol, exchangeRates));
154
155
  }
155
156
  },
157
+ tokenBalances,
156
158
  });
157
159
  const [tokenAmount, setTokenAmount] = useState(isInitialAmountValueForToken
158
160
  ? (_a = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _a !== void 0 ? _a : ''
159
161
  : convertFromFiat((_b = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _b !== void 0 ? _b : '', initialToken.value, exchangeRates));
160
162
  const [tokenSymbol, _setTokenSymbol] = useState(initialToken.value);
161
- const setTokenSymbol = (symbol) => {
163
+ const [fiatAmount, setFiatAmount] = useState(isInitialAmountValueForToken
164
+ ? convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
165
+ : (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
166
+ const setTokenSymbol = useCallback((symbol) => {
162
167
  setHasUserInteracted(true);
163
168
  _setTokenSymbol(symbol);
164
169
  if (fiatAmount)
165
170
  setTokenAmount(convertFromFiat(fiatAmount, symbol, exchangeRates));
166
- };
167
- const [fiatAmount, setFiatAmount] = useState(isInitialAmountValueForToken
168
- ? convertToFiat(tokenAmount !== null && tokenAmount !== void 0 ? tokenAmount : '', tokenSymbol, exchangeRates)
169
- : (_c = initialAmount === null || initialAmount === void 0 ? void 0 : initialAmount.value.toString()) !== null && _c !== void 0 ? _c : '');
171
+ }, [fiatAmount, exchangeRates]);
170
172
  // When we eventually allow changing this, add setter as _setFiatSymbol
171
173
  // And then create a setFiatSymbol function similar to how we have setTokenSymbol
172
174
  const [fiatSymbol] = useState('USD');
173
- const setAmountsByTokenValue = (amount) => {
175
+ const setAmountsByTokenValue = useCallback((amount) => {
174
176
  setTokenAmount(amount);
175
177
  setFiatAmount(convertToFiat(amount, tokenSymbol, exchangeRates));
176
- };
177
- const setAmountsByFiatValue = (amount) => {
178
+ }, [tokenSymbol, exchangeRates]);
179
+ const setAmountsByFiatValue = useCallback((amount) => {
178
180
  setFiatAmount(amount);
179
181
  setTokenAmount(convertFromFiat(amount, tokenSymbol, exchangeRates));
180
- };
182
+ }, [tokenSymbol, exchangeRates]);
181
183
  const [showTokenAsPrimary, setShowTokenAsPrimary] = useState(false);
182
- const switchPrimaryAndSecondary = () => {
184
+ const switchPrimaryAndSecondary = useCallback(() => {
183
185
  setHasUserInteracted(true);
184
186
  setShowTokenAsPrimary(!showTokenAsPrimary);
187
+ if (tokenAmount && isNaN(parseFloat(tokenAmount))) {
188
+ setTokenAmount('');
189
+ }
190
+ if (fiatAmount && isNaN(parseFloat(fiatAmount))) {
191
+ setFiatAmount('');
192
+ }
185
193
  inputEmitter.emit('focus');
186
- };
194
+ }, [fiatAmount, showTokenAsPrimary, tokenAmount]);
187
195
  const isMinimumRespected = minimum
188
196
  ? respectsMinimum({ token: fiatSymbol, value: fiatAmount !== null && fiatAmount !== void 0 ? fiatAmount : '' }, minimum, exchangeRates)
189
197
  : true;
@@ -204,11 +212,11 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
204
212
  },
205
213
  { amount: tokenAmount, symbol: tokenSymbol },
206
214
  ];
207
- const secondaryDisplayHasFixedZeros = isFiatToken(secondaryData.symbol) || secondaryData.symbol === 'USDC';
208
215
  const secondaryDisplay = formatValue({
216
+ maxDecimals: isFiatOrStablecoin(secondaryData.symbol) ? 2 : undefined,
209
217
  symbol: secondaryData.symbol,
210
218
  value: secondaryData.amount,
211
- withFixedZeros: secondaryDisplayHasFixedZeros,
219
+ withFixedZeros: isFiatOrStablecoin(secondaryData.symbol),
212
220
  });
213
221
  const quickSuggestionsWithToken = Array.isArray(quickSuggestions)
214
222
  ? { token: 'USD', values: quickSuggestions }
@@ -223,10 +231,33 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
223
231
  value,
224
232
  }))
225
233
  .filter(({ display }) => display !== undefined);
226
- const balanceNumber = (_e = (_d = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol)) === null || _d === void 0 ? void 0 : _d.balance) !== null && _e !== void 0 ? _e : 0;
227
- const showNotEnoughBalance = Boolean(isNonZero(tokenAmount) &&
228
- tokenAmount !== undefined &&
229
- balanceNumber < parseFloat(tokenAmount));
234
+ const currentToken = tokenBalances === null || tokenBalances === void 0 ? void 0 : tokenBalances.find(({ symbol }) => symbol === tokenSymbol);
235
+ const fiatBalance = calculateFiatBalance(currentToken, exchangeRates);
236
+ const [primaryBalance, secondaryBalance] = showTokenAsPrimary
237
+ ? [
238
+ {
239
+ symbol: tokenSymbol,
240
+ value: (_d = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _d !== void 0 ? _d : 0,
241
+ },
242
+ {
243
+ symbol: fiatSymbol,
244
+ value: fiatBalance,
245
+ },
246
+ ]
247
+ : [
248
+ {
249
+ symbol: fiatSymbol,
250
+ value: fiatBalance,
251
+ },
252
+ {
253
+ symbol: tokenSymbol,
254
+ value: (_e = currentToken === null || currentToken === void 0 ? void 0 : currentToken.balance) !== null && _e !== void 0 ? _e : 0,
255
+ },
256
+ ];
257
+ const showNotEnoughBalance = Boolean(!currentToken ||
258
+ (isNonZero(tokenAmount) &&
259
+ tokenAmount !== undefined &&
260
+ currentToken.balance < parseFloat(tokenAmount)));
230
261
  const showMinimumRequired = Boolean(!isMinimumRespected && !showNotEnoughBalance);
231
262
  const showQuickSuggestions = quickSuggestionsParsed.length > 0 &&
232
263
  !hasUserInteracted &&
@@ -235,62 +266,81 @@ const ReceiveExternalWalletFunds = ({ amount: initialAmount, token: initialToken
235
266
  isFiatToken(quickSuggestionsWithToken.token));
236
267
  const disableTokenSelect = rulesThatDisableTokenSelect.includes(initialToken.rule);
237
268
  const [showTokenSelect, setShowTokenSelect] = useState(false);
238
- const handleSelectToken = (token) => {
269
+ const handleSelectToken = useCallback((token) => {
239
270
  setTokenSymbol(token);
240
271
  setShowTokenSelect(false);
241
- };
242
- const handleQuickSuggestion = (value) => {
272
+ }, [setTokenSymbol]);
273
+ const handleQuickSuggestion = useCallback((value) => {
243
274
  setHasUserInteracted(true);
244
275
  if (isFiatToken(quickSuggestionsWithToken.token))
245
276
  setAmountsByFiatValue(value.toString());
246
277
  else
247
278
  setAmountsByTokenValue(value.toString());
248
279
  inputEmitter.emit('focus');
249
- };
280
+ }, [
281
+ quickSuggestionsWithToken.token,
282
+ setAmountsByFiatValue,
283
+ setAmountsByTokenValue,
284
+ ]);
250
285
  const handleSubmit = useSubmitExternalWalletFunding();
286
+ const disableSubmit = !isMinimumRespected || showNotEnoughBalance || !isNonZero(tokenAmount);
287
+ const closeTokenSelect = useCallback(() => {
288
+ setShowTokenSelect(false);
289
+ inputEmitter.emit('focus');
290
+ }, []);
251
291
  const grayOutSecondaryDisplay = !isNonZero(secondaryData.amount) ||
252
- (secondaryDisplayHasFixedZeros &&
292
+ (isFiatOrStablecoin(secondaryData.symbol) &&
253
293
  parseFloat((_f = secondaryData.amount) !== null && _f !== void 0 ? _f : '0') < 0.0099);
254
294
  const inputSymbolProp = primaryData.symbol === 'USD'
255
295
  ? { leading: '$' }
256
296
  : { trailing: primaryData.symbol };
257
297
  const backButton = (jsx(IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => setDynamicWidgetView('choose-wallet-funding-method'), children: jsx(SvgArrowLeft, {}) }));
258
- return (jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsx(TokenSelectScreen, { onClose: () => setShowTokenSelect(false), onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames('fund-from-wallet__token-select', {
298
+ return (jsxs("div", { className: 'fund-from-wallet', children: [!disableTokenSelect && (jsx(TokenSelectScreen, { onClose: closeTokenSelect, onSelectToken: handleSelectToken, tokens: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : [], currentToken: tokenSymbol, className: classNames('fund-from-wallet__token-select', {
259
299
  'fund-from-wallet__token-select--open': showTokenSelect,
260
- }) })), jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxs("div", { className: 'fund-from-wallet__content', children: [jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__minimum-error', {
300
+ }), showTokenAsPrimary: showTokenAsPrimary, exchangeRates: exchangeRates })), jsx(ModalHeader, { leading: backButton, children: jsx(Typography, { variant: 'title', children: t('dyn_wallet_funding.from_external_wallet.funding_view.title') }) }), jsxs("div", { className: 'fund-from-wallet__content', children: [jsxs("div", { className: 'fund-from-wallet__content__amount-container', children: [minimum && (jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__minimum-error', {
261
301
  'fund-from-wallet__content__amount-container__minimum-error--visible': showMinimumRequired,
262
- }), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
302
+ }), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.minimum_error', {
263
303
  minimum: formatValue({
264
304
  symbol: minimum.token,
265
305
  value: minimum.value,
266
306
  }),
267
307
  }) })), 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'
268
308
  ? (_g = formatValue({
269
- maxDecimals: 8,
309
+ maxDecimals: isFiatOrStablecoin(primaryData.symbol)
310
+ ? 2
311
+ : 8,
270
312
  symbol: undefined,
271
313
  value: primaryData.amount,
272
- withFixedZeros: isFiatToken(primaryData.symbol) ||
273
- primaryData.symbol === 'USDC',
314
+ withFixedZeros: isFiatOrStablecoin(primaryData.symbol),
274
315
  })) !== null && _g !== void 0 ? _g : primaryData.amount
275
316
  : 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: {
276
317
  className: 'fund-from-wallet__content__amount-container__skeleton',
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', {
318
+ } })), 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), weight: 'medium', children: display }, value))) })), !showQuickSuggestions && secondaryDisplay && (jsxs("div", { className: 'fund-from-wallet__content__amount-container__secondary-amount-container', children: [(currentToken === null || currentToken === void 0 ? void 0 : currentToken.logoURI) ? (jsx(Image, { dataTestId: 'token-icon', alt: tokenSymbol, src: currentToken.logoURI, className: 'fund-from-wallet__content__token-icon' })) : null, jsx(Typography, { weight: 'medium', className: classNames('fund-from-wallet__content__amount-container__secondary-amount-container__amount', {
278
319
  'fund-from-wallet__content__amount-container__secondary-amount-container__amount--grayed-out': grayOutSecondaryDisplay,
279
320
  }), 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({
280
321
  symbol: secondaryData.symbol,
281
322
  value: UNAVAILABLE_VALUE,
282
- }) }), jsx("div", { ref: setConversionErrorIconRef, children: jsx(Icon, { size: 'medium', color: 'text-tertiary', children: jsx(SvgFooterInfoIcon, {}) }) }), jsx(Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.network_conversion_error'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__balance-error', {
323
+ }) }), jsx("div", { ref: setConversionErrorIconRef, children: jsx(Icon, { size: 'medium', color: 'text-tertiary', children: jsx(SvgFooterInfoIcon, {}) }) }), jsx(Tooltip, { content: t('dyn_wallet_funding.from_external_wallet.funding_view.pricing_unavailable'), targetRef: conversionErrorIconRef, className: 'fund-from-wallet__content__amount-container__secondary-missing__tooltip' })] })), jsx(Typography, { color: 'error-1', className: classNames('fund-from-wallet__content__amount-container__balance-error', {
283
324
  'fund-from-wallet__content__amount-container__balance-error--visible': showNotEnoughBalance,
284
- }), variant: 'body_normal', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsx(WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsx(Typography, { variant: 'body_small', children: shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsx(Skeleton, { dataTestId: 'balance-skeleton', container: {
325
+ }), variant: 'body_normal', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance_error') })] }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card', children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details', children: [jsx(WalletIcon, { icon: externalWallet.connector.metadata.icon, walletKey: externalWallet.connector.key, className: 'fund-from-wallet__content__wallet-card__wallet-details__icon' }), jsxs("div", { className: 'fund-from-wallet__content__wallet-card__wallet-details__rows', children: [jsx(Typography, { variant: 'body_small', weight: 'medium', children: t('dyn_wallet_funding.from_external_wallet.funding_view.wallet_detail_from') }), jsx(Typography, { variant: 'body_small', color: 'secondary', weight: 'medium', children: shortenWalletAddress(externalWallet.address) })] })] }), tokenBalancesLoading && (jsx(Skeleton, { dataTestId: 'balance-skeleton', container: {
285
326
  className: 'fund-from-wallet__content__wallet-card__balance-skeleton',
286
327
  } })), !tokenBalancesLoading && (jsxs("div", { className: classNames('fund-from-wallet__content__wallet-card__balance', {
287
328
  'fund-from-wallet__content__wallet-card__balance--disable-select': disableTokenSelect,
288
- }), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', weight: 'bold', children: t('dyn_wallet_funding.from_external_wallet.funding_view.balance') }), jsx(Typography, { variant: 'body_small', weight: 'bold', "data-testid": `balance-amount-${tokenSymbol}`, children: formatValue({
289
- maxDecimals: 8,
290
- symbol: tokenSymbol,
291
- value: balanceNumber,
292
- withFixedZeros: isFiatToken(tokenSymbol) || tokenSymbol === 'USDC',
293
- }) })] }), !disableTokenSelect && (jsx(Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsx(SvgChevronDown, {}) }))] }))] })] }), jsx(TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: !isMinimumRespected || showNotEnoughBalance || !isNonZero(tokenAmount), onClick: () => handleSubmit({
329
+ }), onClick: () => !disableTokenSelect && setShowTokenSelect(true), children: [jsxs("div", { className: 'fund-from-wallet__content__wallet-card__balance__rows', children: [jsx(Typography, { variant: 'body_small', "data-testid": `primary-balance-amount-${primaryBalance.symbol}`, weight: 'medium', children: formatValue({
330
+ maxDecimals: isFiatOrStablecoin(primaryBalance.symbol)
331
+ ? 2
332
+ : 6,
333
+ symbol: primaryBalance.symbol,
334
+ value: (_h = primaryBalance.value) !== null && _h !== void 0 ? _h : UNAVAILABLE_VALUE,
335
+ withFixedZeros: isFiatOrStablecoin(primaryBalance.symbol),
336
+ }) }), jsx(Typography, { variant: 'body_small', "data-testid": `secondary-balance-amount-${secondaryBalance.symbol}`, color: 'secondary', weight: 'medium', children: formatValue({
337
+ maxDecimals: isFiatOrStablecoin(secondaryBalance.symbol)
338
+ ? 2
339
+ : 6,
340
+ symbol: secondaryBalance.symbol,
341
+ value: (_j = secondaryBalance.value) !== null && _j !== void 0 ? _j : UNAVAILABLE_VALUE,
342
+ withFixedZeros: isFiatOrStablecoin(secondaryBalance.symbol),
343
+ }) })] }), !disableTokenSelect && (jsx(Icon, { color: 'text-tertiary', size: 'small', className: 'fund-from-wallet__content__wallet-card__balance__icon', children: jsx(SvgChevronDown, { "data-testid": 'token-select-dropdown' }) }))] }))] })] }), jsx(TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', buttonPadding: 'large', typographyProps: { color: 'white' }, className: 'fund-from-wallet__confirm-button', disabled: disableSubmit, onClick: () => handleSubmit({
294
344
  externalWallet,
295
345
  tokenAmount,
296
346
  tokenBalances,