@dynamic-labs/sdk-react-core 0.18.0-RC.9 → 0.18.0-beta.28

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 (577) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +9 -9
  5. package/src/index.cjs +11 -0
  6. package/src/index.d.ts +3 -1
  7. package/src/index.js +7 -0
  8. package/src/lib/Main.cjs +52 -8
  9. package/src/lib/Main.js +52 -8
  10. package/src/lib/assets/index.d.ts +1 -0
  11. package/src/lib/assets/no-wallet-found.cjs +75 -0
  12. package/src/lib/assets/no-wallet-found.js +51 -0
  13. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +3 -0
  14. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +3 -0
  15. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +3 -0
  16. package/src/lib/components/AnimatePresence/AnimatePresence.js +3 -0
  17. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +3 -0
  18. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -0
  19. package/src/lib/components/Button/Button.cjs +12 -4
  20. package/src/lib/components/Button/Button.d.ts +3 -2
  21. package/src/lib/components/Button/Button.js +12 -4
  22. package/src/lib/components/ChainCard/ChainCard.cjs +1 -1
  23. package/src/lib/components/ChainCard/ChainCard.js +1 -1
  24. package/src/lib/components/Divider/Divider.cjs +3 -0
  25. package/src/lib/components/Divider/Divider.js +3 -0
  26. package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -2
  27. package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -2
  28. package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
  29. package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
  30. package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
  31. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
  32. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
  33. package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
  34. package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
  35. package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
  36. package/src/lib/components/InlineWidget/index.d.ts +2 -0
  37. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.cjs +9 -0
  38. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.d.ts +2 -0
  39. package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.js +5 -0
  40. package/src/lib/components/LegacySafariCssOverrides/index.d.ts +1 -0
  41. package/src/lib/components/LogoutButton/LogoutButton.cjs +17 -3
  42. package/src/lib/components/LogoutButton/LogoutButton.js +17 -3
  43. package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +86 -0
  44. package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
  45. package/src/lib/components/MenuList/Dropdown/Dropdown.js +82 -0
  46. package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
  47. package/src/lib/components/MenuList/MenuList/MenuList.cjs +34 -0
  48. package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
  49. package/src/lib/components/MenuList/MenuList/MenuList.js +30 -0
  50. package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
  51. package/src/lib/components/MenuList/index.d.ts +1 -0
  52. package/src/lib/components/MenuList/utils/index.d.ts +1 -0
  53. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
  54. package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
  55. package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
  56. package/src/lib/components/Modal/Modal.cjs +3 -0
  57. package/src/lib/components/Modal/Modal.js +3 -0
  58. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +12 -13
  59. package/src/lib/components/NetworkPicker/NetworkPicker.js +12 -13
  60. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +3 -0
  61. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +3 -0
  62. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +3 -0
  63. package/src/lib/components/NetworkPicker/components/Network/Network.js +3 -0
  64. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +3 -0
  65. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +3 -0
  66. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +3 -0
  67. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +3 -0
  68. package/src/lib/components/OverlayCard/OverlayCard.cjs +12 -11
  69. package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
  70. package/src/lib/components/OverlayCard/OverlayCard.js +13 -11
  71. package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
  72. package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
  73. package/src/lib/components/Popper/Popper/Popper.js +12 -12
  74. package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
  75. package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
  76. package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
  77. package/src/lib/components/Popper/PopperContext/PopperContext.js +1 -1
  78. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
  79. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
  80. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
  81. package/src/lib/components/Popper/utils/index.d.ts +0 -1
  82. package/src/lib/components/Portal/Portal.cjs +5 -2
  83. package/src/lib/components/Portal/Portal.js +5 -2
  84. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +9 -1
  85. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +9 -1
  86. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
  87. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
  88. package/src/lib/components/ShadowDOM/ShadowDOM.cjs +4 -2
  89. package/src/lib/components/ShadowDOM/ShadowDOM.js +4 -2
  90. package/src/lib/components/Step/Step.cjs +23 -2
  91. package/src/lib/components/Step/Step.d.ts +2 -3
  92. package/src/lib/components/Step/Step.js +24 -3
  93. package/src/lib/components/Toolkit/Toolkit.cjs +3 -3
  94. package/src/lib/components/Toolkit/Toolkit.js +3 -3
  95. package/src/lib/components/Toolkit/components/MultiWalletSwitch.cjs +18 -0
  96. package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +8 -0
  97. package/src/lib/components/Toolkit/components/MultiWalletSwitch.js +14 -0
  98. package/src/lib/components/Toolkit/components/index.d.ts +1 -1
  99. package/src/lib/components/Tooltip/Tooltip.cjs +3 -0
  100. package/src/lib/components/Tooltip/Tooltip.js +3 -0
  101. package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -3
  102. package/src/lib/components/TosAndPp/TosAndPp.d.ts +1 -6
  103. package/src/lib/components/TosAndPp/TosAndPp.js +19 -4
  104. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
  105. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
  106. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +4 -1
  107. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +4 -1
  108. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +3 -0
  109. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +3 -0
  110. package/src/lib/components/UserAddress/UserAddress.cjs +4 -1
  111. package/src/lib/components/UserAddress/UserAddress.js +4 -1
  112. package/src/lib/components/UserProfile/UserProfile.cjs +6 -14
  113. package/src/lib/components/UserProfile/UserProfile.js +6 -14
  114. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +3 -0
  115. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +3 -0
  116. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +3 -0
  117. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +3 -0
  118. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +15 -64
  119. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.d.ts +2 -4
  120. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +15 -64
  121. package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +33 -0
  122. package/src/lib/components/WalletInformationCard/WalletInformationCard.d.ts +11 -0
  123. package/src/lib/components/WalletInformationCard/WalletInformationCard.js +29 -0
  124. package/src/lib/components/WalletInformationCard/index.d.ts +1 -0
  125. package/src/lib/components/index.d.ts +3 -0
  126. package/src/lib/context/AccountExistsContext/AccountExistsContext.cjs +27 -0
  127. package/src/lib/context/AccountExistsContext/AccountExistsContext.d.ts +17 -0
  128. package/src/lib/context/AccountExistsContext/AccountExistsContext.js +21 -0
  129. package/src/lib/context/AccountExistsContext/index.d.ts +1 -0
  130. package/src/lib/context/DynamicContext/DynamicContext.cjs +156 -76
  131. package/src/lib/context/DynamicContext/DynamicContext.d.ts +13 -131
  132. package/src/lib/context/DynamicContext/DynamicContext.js +157 -78
  133. package/src/lib/context/DynamicContext/helpers.cjs +6 -5
  134. package/src/lib/context/DynamicContext/helpers.d.ts +4 -2
  135. package/src/lib/context/DynamicContext/helpers.js +6 -5
  136. package/src/lib/context/DynamicContext/hooks/index.d.ts +4 -1
  137. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -1
  138. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -1
  139. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/index.d.ts +1 -0
  140. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +33 -0
  141. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.d.ts +1 -0
  142. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +29 -0
  143. package/src/lib/context/DynamicContext/types/index.d.ts +146 -0
  144. package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +7 -2
  145. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +3 -0
  146. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +3 -0
  147. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +9 -3
  148. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
  149. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +9 -3
  150. package/src/lib/context/DynamicContext/useDynamicContext.cjs +8 -3
  151. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +2 -2
  152. package/src/lib/context/DynamicContext/useDynamicContext.js +8 -3
  153. package/src/lib/context/DynamicContext/useInternalDynamicContext.d.ts +1 -1
  154. package/src/lib/context/FundingContext/FundingContext.cjs +13 -1
  155. package/src/lib/context/FundingContext/FundingContext.js +13 -1
  156. package/src/lib/context/MockContext/MockContext.cjs +36 -2
  157. package/src/lib/context/MockContext/MockContext.d.ts +1 -1
  158. package/src/lib/context/MockContext/MockContext.js +36 -2
  159. package/src/lib/context/MockContext/constants/index.cjs +64 -0
  160. package/src/lib/context/MockContext/constants/index.d.ts +2 -0
  161. package/src/lib/context/MockContext/constants/index.js +60 -0
  162. package/src/lib/context/QrCodeContext/QrCodeContext.cjs +3 -0
  163. package/src/lib/context/QrCodeContext/QrCodeContext.js +3 -0
  164. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +3 -0
  165. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +3 -0
  166. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +5 -3
  167. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +5 -3
  168. package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
  169. package/src/lib/context/WalletContext/WalletContext.cjs +4 -1
  170. package/src/lib/context/WalletContext/WalletContext.js +4 -1
  171. package/src/lib/data/api.cjs +27 -0
  172. package/src/lib/data/api.d.ts +4 -0
  173. package/src/lib/data/api.js +28 -2
  174. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -0
  175. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -0
  176. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +6 -1
  177. package/src/lib/layout/DynamicAuthLayout/Header/header.js +6 -1
  178. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +4 -1
  179. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +4 -1
  180. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +3 -0
  181. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +3 -0
  182. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +1 -1
  183. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.js +1 -1
  184. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +3 -0
  185. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +3 -0
  186. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +3 -0
  187. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +3 -0
  188. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -0
  189. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -0
  190. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +7 -3
  191. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +7 -3
  192. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +7 -4
  193. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +7 -4
  194. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
  195. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
  196. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
  197. package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
  198. package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
  199. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +54 -0
  200. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.d.ts +9 -0
  201. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +50 -0
  202. package/src/lib/layouts/BridgeNextWalletToConnectLayout/index.d.ts +1 -0
  203. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +3 -0
  204. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +3 -0
  205. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +5 -2
  206. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
  207. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +5 -2
  208. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +3 -0
  209. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +3 -0
  210. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -0
  211. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -0
  212. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -0
  213. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -0
  214. package/src/lib/shared/types/index.d.ts +6 -2
  215. package/src/lib/shared/utils/classes/storage/localStorage.cjs +36 -24
  216. package/src/lib/shared/utils/classes/storage/localStorage.d.ts +16 -3
  217. package/src/lib/shared/utils/classes/storage/localStorage.js +37 -25
  218. package/src/lib/shared/utils/hooks/index.d.ts +2 -0
  219. package/src/lib/shared/utils/hooks/useEffectOnce/index.d.ts +1 -0
  220. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.cjs +27 -0
  221. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.d.ts +17 -0
  222. package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.js +23 -0
  223. package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
  224. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
  225. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
  226. package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
  227. package/src/lib/styles/index.shadow.cjs +1 -1
  228. package/src/lib/styles/index.shadow.js +1 -1
  229. package/src/lib/utils/constants/localStorage.cjs +3 -1
  230. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  231. package/src/lib/utils/constants/localStorage.js +3 -2
  232. package/src/lib/utils/constants/onrampProviders.cjs +7 -0
  233. package/src/lib/utils/constants/onrampProviders.d.ts +1 -0
  234. package/src/lib/utils/constants/onrampProviders.js +3 -0
  235. package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +10 -1
  236. package/src/lib/utils/functions/createUserProfile/createUserProfile.js +10 -1
  237. package/src/lib/utils/functions/generateMessages/index.cjs +3 -3
  238. package/src/lib/utils/functions/generateMessages/index.d.ts +1 -1
  239. package/src/lib/utils/functions/generateMessages/index.js +3 -3
  240. package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +2 -1
  241. package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
  242. package/src/lib/utils/functions/getAuthToken/getAuthToken.js +2 -1
  243. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -0
  244. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -0
  245. package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +1 -1
  246. package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +1 -1
  247. package/src/lib/utils/functions/getMissingChains/getMissingChains.js +1 -1
  248. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -2
  249. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +3 -3
  250. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -2
  251. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
  252. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
  253. package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
  254. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +3 -1
  255. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -1
  256. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +3 -1
  257. package/src/lib/utils/functions/index.d.ts +3 -0
  258. package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +1 -0
  259. package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +1 -0
  260. package/src/lib/utils/functions/isOnrampProvider/index.d.ts +1 -0
  261. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.cjs +9 -0
  262. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.d.ts +2 -0
  263. package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.js +5 -0
  264. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -2
  265. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.d.ts +1 -1
  266. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -2
  267. package/src/lib/utils/functions/isSocialKycEnabled/index.d.ts +1 -0
  268. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs +7 -0
  269. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.d.ts +2 -0
  270. package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.js +3 -0
  271. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
  272. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
  273. package/src/lib/utils/functions/storeAuthToken/index.cjs +1 -3
  274. package/src/lib/utils/functions/storeAuthToken/index.js +1 -3
  275. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
  276. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
  277. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +17 -7
  278. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +18 -8
  279. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +11 -2
  280. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +11 -2
  281. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
  282. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
  283. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +5 -2
  284. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +5 -2
  285. package/src/lib/utils/hooks/index.d.ts +2 -0
  286. package/src/lib/utils/hooks/multiWallet/useMultiWallet/index.d.ts +1 -0
  287. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +17 -0
  288. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +8 -0
  289. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +13 -0
  290. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +22 -5
  291. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +5 -2
  292. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +22 -5
  293. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +9 -11
  294. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +9 -11
  295. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.cjs +29 -0
  296. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.d.ts +5 -0
  297. package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.js +25 -0
  298. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +13 -6
  299. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +13 -6
  300. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
  301. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
  302. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +124 -83
  303. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +14 -10
  304. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +126 -85
  305. package/src/lib/utils/hooks/useConnectWithEmail/index.d.ts +1 -0
  306. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +6 -4
  307. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +1 -4
  308. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +6 -4
  309. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +13 -23
  310. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
  311. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +13 -23
  312. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +69 -0
  313. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.d.ts +1 -0
  314. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +65 -0
  315. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -3
  316. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
  317. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -3
  318. package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
  319. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
  320. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
  321. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
  322. package/src/lib/utils/hooks/useEmailProvider/index.d.ts +1 -0
  323. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +54 -0
  324. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +10 -0
  325. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +50 -0
  326. package/src/lib/utils/hooks/useEventListener/index.d.ts +1 -0
  327. package/src/lib/utils/hooks/useEventListener/useEventListener.cjs +25 -0
  328. package/src/lib/utils/hooks/useEventListener/useEventListener.d.ts +1 -0
  329. package/src/lib/utils/hooks/useEventListener/useEventListener.js +21 -0
  330. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -1
  331. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +3 -1
  332. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -2
  333. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +10 -5
  334. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +10 -5
  335. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +17 -2
  336. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +17 -2
  337. package/src/lib/utils/hooks/usePromise/usePromise.cjs +92 -32
  338. package/src/lib/utils/hooks/usePromise/usePromise.d.ts +33 -6
  339. package/src/lib/utils/hooks/usePromise/usePromise.js +93 -33
  340. package/src/lib/utils/hooks/usePromise/usePromise.types.d.ts +9 -0
  341. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.cjs +18 -0
  342. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.d.ts +13 -0
  343. package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.js +14 -0
  344. package/src/lib/utils/hooks/usePromise/utils/createReducer/index.d.ts +1 -0
  345. package/src/lib/utils/hooks/usePromise/utils/index.d.ts +2 -0
  346. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/index.d.ts +1 -0
  347. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +32 -0
  348. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.d.ts +5 -0
  349. package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +28 -0
  350. package/src/lib/utils/hooks/useSocialAccounts/index.d.ts +1 -0
  351. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +159 -0
  352. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +10 -0
  353. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +155 -0
  354. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
  355. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
  356. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
  357. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +32 -6
  358. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +8 -4
  359. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +33 -7
  360. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +3 -0
  361. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +3 -0
  362. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +18 -3
  363. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +2 -2
  364. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +19 -4
  365. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +12 -2
  366. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -2
  367. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +12 -2
  368. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +31 -4
  369. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +5 -4
  370. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +31 -4
  371. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -6
  372. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -6
  373. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +3 -0
  374. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +3 -0
  375. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +73 -0
  376. package/src/lib/views/AccountExistsView/AccountExistsView.d.ts +2 -0
  377. package/src/lib/views/AccountExistsView/AccountExistsView.js +69 -0
  378. package/src/lib/views/AccountExistsView/index.d.ts +1 -0
  379. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +38 -0
  380. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.d.ts +2 -0
  381. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +34 -0
  382. package/src/lib/views/BridgeNextWalletConnectionView/index.d.ts +1 -0
  383. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +17 -12
  384. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +17 -12
  385. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
  386. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
  387. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +5 -3
  388. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +5 -3
  389. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -1
  390. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -1
  391. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +13 -3
  392. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +13 -3
  393. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -0
  394. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -0
  395. package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
  396. package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
  397. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +4 -1
  398. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -1
  399. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +4 -1
  400. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +4 -1
  401. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +3 -0
  402. package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -0
  403. package/src/lib/views/EmailVerification/EmailVerification.cjs +13 -4
  404. package/src/lib/views/EmailVerification/EmailVerification.js +14 -5
  405. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +3 -0
  406. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +3 -0
  407. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +3 -0
  408. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +3 -0
  409. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +27 -51
  410. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +27 -51
  411. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +2 -2
  412. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +2 -2
  413. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +10 -5
  414. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +10 -5
  415. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +23 -21
  416. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +24 -22
  417. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +27 -27
  418. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +27 -27
  419. package/src/lib/views/NoAccess/NoAccess.cjs +14 -20
  420. package/src/lib/views/NoAccess/NoAccess.js +14 -20
  421. package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
  422. package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
  423. package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
  424. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +3 -0
  425. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -0
  426. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +3 -0
  427. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +3 -0
  428. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +3 -0
  429. package/src/lib/views/PendingConnectView/PendingConnectView.js +3 -0
  430. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +3 -0
  431. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +3 -0
  432. package/src/lib/views/QrCodeView/QRCode.cjs +3 -0
  433. package/src/lib/views/QrCodeView/QRCode.js +3 -0
  434. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -0
  435. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -0
  436. package/src/lib/views/QrCodeView/QrCodeView.cjs +3 -0
  437. package/src/lib/views/QrCodeView/QrCodeView.js +3 -0
  438. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +5 -2
  439. package/src/lib/views/SendBalanceView/SendBalanceView.js +5 -2
  440. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +3 -0
  441. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +3 -0
  442. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +3 -0
  443. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +3 -0
  444. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +3 -0
  445. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +3 -0
  446. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +4 -1
  447. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +4 -1
  448. package/src/lib/views/WalletList/{SearchInstead/SearchInstead.cjs → SearchNotFoundMessage/SearchNotFoundMessage.cjs} +6 -2
  449. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +8 -0
  450. package/src/lib/views/WalletList/{SearchInstead/SearchInstead.js → SearchNotFoundMessage/SearchNotFoundMessage.js} +6 -2
  451. package/src/lib/views/WalletList/SearchNotFoundMessage/index.d.ts +1 -0
  452. package/src/lib/views/WalletList/WalletList.cjs +4 -3
  453. package/src/lib/views/WalletList/WalletList.js +4 -3
  454. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +5 -2
  455. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +5 -2
  456. package/src/lib/views/WalletList/WalletListItem/WalletListItem.types.d.ts +1 -2
  457. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +4 -1
  458. package/src/lib/views/WalletLockedView/WalletLockedView.js +4 -1
  459. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -0
  460. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -0
  461. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +8 -2
  462. package/src/lib/views/WalletUsedView/WalletUsedView.js +8 -2
  463. package/src/lib/views/viewToComponentMap.cjs +5 -0
  464. package/src/lib/views/viewToComponentMap.js +5 -0
  465. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +18 -7
  466. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
  467. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +19 -8
  468. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +3 -0
  469. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +3 -0
  470. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +3 -0
  471. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +3 -0
  472. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +30 -8
  473. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +0 -1
  474. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +31 -9
  475. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +3 -0
  476. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +3 -0
  477. package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +2 -0
  478. package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +2 -0
  479. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +16 -10
  480. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +16 -10
  481. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
  482. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
  483. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +12 -3
  484. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +14 -5
  485. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +3 -0
  486. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +3 -0
  487. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +8 -5
  488. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +8 -5
  489. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +3 -0
  490. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +3 -0
  491. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +7 -4
  492. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
  493. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +7 -4
  494. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +3 -0
  495. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +3 -0
  496. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +6 -1
  497. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +6 -1
  498. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +3 -0
  499. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +3 -0
  500. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +6 -3
  501. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +6 -3
  502. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +3 -0
  503. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +3 -0
  504. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -0
  505. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -0
  506. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -1
  507. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -1
  508. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +3 -0
  509. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +3 -0
  510. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +3 -0
  511. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +3 -0
  512. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -0
  513. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -0
  514. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +3 -0
  515. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +3 -0
  516. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +4 -1
  517. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +4 -1
  518. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +3 -0
  519. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +3 -0
  520. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +3 -0
  521. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +3 -0
  522. package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +17 -1
  523. package/src/lib/widgets/DynamicWidget/helpers/helpers.js +17 -1
  524. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +3 -0
  525. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +3 -0
  526. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +3 -0
  527. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +3 -0
  528. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +3 -0
  529. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +3 -0
  530. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
  531. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
  532. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +3 -0
  533. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +3 -0
  534. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +3 -0
  535. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +3 -0
  536. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +3 -0
  537. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +3 -0
  538. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -0
  539. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -0
  540. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +3 -0
  541. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +3 -0
  542. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +3 -0
  543. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +3 -0
  544. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +3 -0
  545. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +3 -0
  546. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +3 -0
  547. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +3 -0
  548. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -0
  549. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -0
  550. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +3 -0
  551. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +3 -0
  552. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +3 -0
  553. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +3 -0
  554. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +3 -0
  555. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +3 -0
  556. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -70
  557. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
  558. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -64
  559. package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
  560. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
  561. package/src/lib/components/Toolkit/components/BrandStyleSwitch.cjs +0 -22
  562. package/src/lib/components/Toolkit/components/BrandStyleSwitch.d.ts +0 -2
  563. package/src/lib/components/Toolkit/components/BrandStyleSwitch.js +0 -18
  564. package/src/lib/views/WalletList/SearchInstead/SearchInstead.d.ts +0 -2
  565. package/src/lib/views/WalletList/SearchInstead/index.d.ts +0 -1
  566. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -17
  567. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -6
  568. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -9
  569. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.cjs +0 -57
  570. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.d.ts +0 -6
  571. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.js +0 -53
  572. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/index.d.ts +0 -1
  573. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.cjs +0 -58
  574. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.d.ts +0 -6
  575. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.js +0 -54
  576. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/index.d.ts +0 -1
  577. /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
@@ -29,6 +29,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
29
29
  import '../../context/DynamicContext/DynamicContext.js';
30
30
  import '../../context/ErrorContext/ErrorContext.js';
31
31
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
32
+ import '../../context/AccountExistsContext/AccountExistsContext.js';
32
33
  import 'react-dom';
33
34
  import '../ShadowDOM/ShadowDOM.js';
34
35
  import 'react-focus-lock';
@@ -40,6 +41,8 @@ import '../Popper/Popper/Popper.js';
40
41
  import '../Popper/PopperContext/PopperContext.js';
41
42
  import 'formik';
42
43
  import 'yup';
44
+ import '../InlineWidget/InlineWidget.js';
45
+ import '../MenuList/Dropdown/Dropdown.js';
43
46
  import '../../context/MockContext/MockContext.js';
44
47
  import '../../context/CaptchaContext/CaptchaContext.js';
45
48
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
@@ -48,7 +51,7 @@ import { TransactionRow } from '../TransactionConfirmationPageLayout/components/
48
51
  const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
49
52
  const closeButton = onClickClose && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close' }, { children: jsx(SvgClose, {}) })));
50
53
  const networkIcon = (jsx("div", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
51
- return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx("div", Object.assign({ className: 'transaction-status-layout__footer' }, { children: jsx(PoweredByDynamic, {}) })))] }))] })));
54
+ return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
52
55
  };
53
56
 
54
57
  export { TransactionStatusLayout };
@@ -23,6 +23,7 @@ require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsS
23
23
  require('../../../context/DynamicContext/DynamicContext.cjs');
24
24
  require('../../../context/ErrorContext/ErrorContext.cjs');
25
25
  require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
26
+ require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
26
27
  var useResizeObserver = require('../../../utils/hooks/useResizeObserver/useResizeObserver.cjs');
27
28
  var useTransition = require('../../../utils/hooks/useTransition/useTransition.cjs');
28
29
  require('react-dom');
@@ -39,6 +40,8 @@ require('../../Popper/Popper/Popper.cjs');
39
40
  require('../../Popper/PopperContext/PopperContext.cjs');
40
41
  require('formik');
41
42
  require('yup');
43
+ require('../../InlineWidget/InlineWidget.cjs');
44
+ require('../../MenuList/Dropdown/Dropdown.cjs');
42
45
  require('../../../context/MockContext/MockContext.cjs');
43
46
  require('../../../context/CaptchaContext/CaptchaContext.cjs');
44
47
  require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
@@ -19,6 +19,7 @@ import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSe
19
19
  import '../../../context/DynamicContext/DynamicContext.js';
20
20
  import '../../../context/ErrorContext/ErrorContext.js';
21
21
  import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
22
+ import '../../../context/AccountExistsContext/AccountExistsContext.js';
22
23
  import { useResizeObserver } from '../../../utils/hooks/useResizeObserver/useResizeObserver.js';
23
24
  import { useTransition } from '../../../utils/hooks/useTransition/useTransition.js';
24
25
  import 'react-dom';
@@ -35,6 +36,8 @@ import '../../Popper/Popper/Popper.js';
35
36
  import '../../Popper/PopperContext/PopperContext.js';
36
37
  import 'formik';
37
38
  import 'yup';
39
+ import '../../InlineWidget/InlineWidget.js';
40
+ import '../../MenuList/Dropdown/Dropdown.js';
38
41
  import '../../../context/MockContext/MockContext.js';
39
42
  import '../../../context/CaptchaContext/CaptchaContext.js';
40
43
  import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
@@ -26,6 +26,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
26
26
  require('../../context/DynamicContext/DynamicContext.cjs');
27
27
  require('../../context/ErrorContext/ErrorContext.cjs');
28
28
  require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
29
+ require('../../context/AccountExistsContext/AccountExistsContext.cjs');
29
30
  require('react-dom');
30
31
  require('../ShadowDOM/ShadowDOM.cjs');
31
32
  require('../../context/ThemeContext/ThemeContext.cjs');
@@ -39,6 +40,8 @@ require('../Popper/Popper/Popper.cjs');
39
40
  require('../Popper/PopperContext/PopperContext.cjs');
40
41
  require('formik');
41
42
  require('yup');
43
+ require('../InlineWidget/InlineWidget.cjs');
44
+ require('../MenuList/Dropdown/Dropdown.cjs');
42
45
  require('../../context/MockContext/MockContext.cjs');
43
46
  require('../../context/CaptchaContext/CaptchaContext.cjs');
44
47
  var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
@@ -48,7 +51,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
48
51
  var _a;
49
52
  const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
50
53
  const nameService = useFetchNameService.useFetchNameService(walletAddress);
51
- const { data: walletConnectorAddress } = usePromise.usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), [], {
54
+ const { data: walletConnectorAddress } = usePromise.usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), {
52
55
  enabled: !userProfile && Boolean(walletConnector),
53
56
  });
54
57
  return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-address__container' }, { children: [jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: nameService.name })), jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_medium', color: 'secondary', className: 'user-address' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress || walletConnectorAddress, 4, 4) })))] })));
@@ -22,6 +22,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
22
22
  import '../../context/DynamicContext/DynamicContext.js';
23
23
  import '../../context/ErrorContext/ErrorContext.js';
24
24
  import '../../context/AccessDeniedContext/AccessDeniedContext.js';
25
+ import '../../context/AccountExistsContext/AccountExistsContext.js';
25
26
  import 'react-dom';
26
27
  import '../ShadowDOM/ShadowDOM.js';
27
28
  import '../../context/ThemeContext/ThemeContext.js';
@@ -35,6 +36,8 @@ import '../Popper/Popper/Popper.js';
35
36
  import '../Popper/PopperContext/PopperContext.js';
36
37
  import 'formik';
37
38
  import 'yup';
39
+ import '../InlineWidget/InlineWidget.js';
40
+ import '../MenuList/Dropdown/Dropdown.js';
38
41
  import '../../context/MockContext/MockContext.js';
39
42
  import '../../context/CaptchaContext/CaptchaContext.js';
40
43
  import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
@@ -44,7 +47,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
44
47
  var _a;
45
48
  const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
46
49
  const nameService = useFetchNameService(walletAddress);
47
- const { data: walletConnectorAddress } = usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), [], {
50
+ const { data: walletConnectorAddress } = usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), {
48
51
  enabled: !userProfile && Boolean(walletConnector),
49
52
  });
50
53
  return (jsxs("div", Object.assign({ className: 'user-address__container' }, { children: [jsx(StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: nameService.name })), jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsx(Typography, Object.assign({ variant: 'numbers_medium', color: 'secondary', className: 'user-address' }, { children: shortenWalletAddress(walletAddress, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: shortenWalletAddress(walletAddress || walletConnectorAddress, 4, 4) })))] })));
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
- var React = require('react');
7
6
  var fieldsConfig = require('../../views/CollectUserDataView/fieldsConfig.cjs');
8
7
  require('@dynamic-labs/sdk-api');
9
8
  require('../../shared/logger.cjs');
10
9
  require('@dynamic-labs/iconic');
11
10
  require('@dynamic-labs/wallet-connector-core');
12
11
  require('../../context/ViewContext/ViewContext.cjs');
12
+ require('react');
13
13
  require('@dynamic-labs/wallet-book');
14
14
  var index$1 = require('../../shared/utils/functions/getValueByKey/index.cjs');
15
15
  require('@dynamic-labs/utils');
@@ -21,6 +21,7 @@ var classNames = require('../../utils/functions/classNames/classNames.cjs');
21
21
  var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
22
22
  require('@dynamic-labs/multi-wallet');
23
23
  var index = require('../../utils/functions/getEnabledOAuthProviders/index.cjs');
24
+ var isSocialKycEnabled = require('../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs');
24
25
  var getUserProfileFields = require('../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
25
26
  var UserProfileField = require('./parts/UserProfileField/UserProfileField.cjs');
26
27
  var UserProfileSection = require('./parts/UserProfileSection/UserProfileSection.cjs');
@@ -32,18 +33,9 @@ const UserProfile = ({ rootClassName }) => {
32
33
  projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
33
34
  user,
34
35
  });
35
- const providers = index.getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers);
36
- const verifiedOAuthCredentialsMap = React.useMemo(() => {
37
- var _a, _b;
38
- const verifiedOAuthCredential = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.filter((credential) => credential.format === 'oauth')) !== null && _b !== void 0 ? _b : [];
39
- return Object.fromEntries(new Map(verifiedOAuthCredential.map((credential) => {
40
- var _a;
41
- return [
42
- (_a = credential.oauthProvider) !== null && _a !== void 0 ? _a : credential.id,
43
- credential,
44
- ];
45
- })));
46
- }, [user === null || user === void 0 ? void 0 : user.verifiedCredentials]);
36
+ const providers = isSocialKycEnabled.isSocialKycEnabled(projectSettings)
37
+ ? index.getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers)
38
+ : [];
47
39
  const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
48
40
  if (!user)
49
41
  return null;
@@ -51,7 +43,7 @@ const UserProfile = ({ rootClassName }) => {
51
43
  const { label } = index$1.getValueByKey(fieldsConfig.fieldsConfig, name);
52
44
  const value = mapFieldKeyToValue(name);
53
45
  return (jsxRuntime.jsx(UserProfileField.UserProfileField, { name: name, label: label, value: value }, name));
54
- }) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider, authorizationUrl: authorizationUrl, verifiedCredential: verifiedOAuthCredentialsMap[provider] }, provider))) })) })))] })));
46
+ }) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider }, provider))) })) })))] })));
55
47
  };
56
48
 
57
49
  exports.UserProfile = UserProfile;
@@ -1,11 +1,11 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
2
  import { fieldsConfig } from '../../views/CollectUserDataView/fieldsConfig.js';
4
3
  import '@dynamic-labs/sdk-api';
5
4
  import '../../shared/logger.js';
6
5
  import '@dynamic-labs/iconic';
7
6
  import '@dynamic-labs/wallet-connector-core';
8
7
  import '../../context/ViewContext/ViewContext.js';
8
+ import 'react';
9
9
  import '@dynamic-labs/wallet-book';
10
10
  import { getValueByKey } from '../../shared/utils/functions/getValueByKey/index.js';
11
11
  import '@dynamic-labs/utils';
@@ -17,6 +17,7 @@ import { classNames } from '../../utils/functions/classNames/classNames.js';
17
17
  import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
18
18
  import '@dynamic-labs/multi-wallet';
19
19
  import { getEnabledOAuthProviders } from '../../utils/functions/getEnabledOAuthProviders/index.js';
20
+ import { isSocialKycEnabled } from '../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.js';
20
21
  import { getUserProfileFields } from '../../utils/functions/getUserProfileFields/getUserProfileFields.js';
21
22
  import { UserProfileField } from './parts/UserProfileField/UserProfileField.js';
22
23
  import { UserProfileSection } from './parts/UserProfileSection/UserProfileSection.js';
@@ -28,18 +29,9 @@ const UserProfile = ({ rootClassName }) => {
28
29
  projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
29
30
  user,
30
31
  });
31
- const providers = getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers);
32
- const verifiedOAuthCredentialsMap = useMemo(() => {
33
- var _a, _b;
34
- const verifiedOAuthCredential = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.filter((credential) => credential.format === 'oauth')) !== null && _b !== void 0 ? _b : [];
35
- return Object.fromEntries(new Map(verifiedOAuthCredential.map((credential) => {
36
- var _a;
37
- return [
38
- (_a = credential.oauthProvider) !== null && _a !== void 0 ? _a : credential.id,
39
- credential,
40
- ];
41
- })));
42
- }, [user === null || user === void 0 ? void 0 : user.verifiedCredentials]);
32
+ const providers = isSocialKycEnabled(projectSettings)
33
+ ? getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers)
34
+ : [];
43
35
  const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
44
36
  if (!user)
45
37
  return null;
@@ -47,7 +39,7 @@ const UserProfile = ({ rootClassName }) => {
47
39
  const { label } = getValueByKey(fieldsConfig, name);
48
40
  const value = mapFieldKeyToValue(name);
49
41
  return (jsx(UserProfileField, { name: name, label: label, value: value }, name));
50
- }) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsx(UserProfileSocialAccount, { provider: provider, authorizationUrl: authorizationUrl, verifiedCredential: verifiedOAuthCredentialsMap[provider] }, provider))) })) })))] })));
42
+ }) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsx(UserProfileSocialAccount, { provider: provider }, provider))) })) })))] })));
51
43
  };
52
44
 
53
45
  export { UserProfile };
@@ -30,6 +30,7 @@ require('@dynamic-labs/rpc-providers');
30
30
  require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
31
31
  require('../../../../context/ErrorContext/ErrorContext.cjs');
32
32
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
33
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
33
34
  require('../../../IconButton/IconButton.cjs');
34
35
  require('../../../Alert/Alert.cjs');
35
36
  require('../../../../context/MockContext/MockContext.cjs');
@@ -39,6 +40,8 @@ require('../../../Popper/Popper/Popper.cjs');
39
40
  require('../../../Popper/PopperContext/PopperContext.cjs');
40
41
  require('formik');
41
42
  require('yup');
43
+ require('../../../InlineWidget/InlineWidget.cjs');
44
+ require('../../../MenuList/Dropdown/Dropdown.cjs');
42
45
  var VerifiedEmailIcon = require('./components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
43
46
 
44
47
  const UserProfileField = ({ name, label, value, }) => {
@@ -26,6 +26,7 @@ import '@dynamic-labs/rpc-providers';
26
26
  import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
27
27
  import '../../../../context/ErrorContext/ErrorContext.js';
28
28
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
29
+ import '../../../../context/AccountExistsContext/AccountExistsContext.js';
29
30
  import '../../../IconButton/IconButton.js';
30
31
  import '../../../Alert/Alert.js';
31
32
  import '../../../../context/MockContext/MockContext.js';
@@ -35,6 +36,8 @@ import '../../../Popper/Popper/Popper.js';
35
36
  import '../../../Popper/PopperContext/PopperContext.js';
36
37
  import 'formik';
37
38
  import 'yup';
39
+ import '../../../InlineWidget/InlineWidget.js';
40
+ import '../../../MenuList/Dropdown/Dropdown.js';
38
41
  import { VerifiedEmailIcon } from './components/VerifiedEmailIcon/VerifiedEmailIcon.js';
39
42
 
40
43
  const UserProfileField = ({ name, label, value, }) => {
@@ -30,6 +30,7 @@ require('@dynamic-labs/rpc-providers');
30
30
  require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
31
31
  require('../../../../context/ErrorContext/ErrorContext.cjs');
32
32
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
33
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
33
34
  require('../../../IconButton/IconButton.cjs');
34
35
  require('../../../Alert/Alert.cjs');
35
36
  require('../../../../context/MockContext/MockContext.cjs');
@@ -39,6 +40,8 @@ require('../../../Popper/Popper/Popper.cjs');
39
40
  require('../../../Popper/PopperContext/PopperContext.cjs');
40
41
  require('formik');
41
42
  require('yup');
43
+ require('../../../InlineWidget/InlineWidget.cjs');
44
+ require('../../../MenuList/Dropdown/Dropdown.cjs');
42
45
 
43
46
  const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
44
47
 
@@ -26,6 +26,7 @@ import '@dynamic-labs/rpc-providers';
26
26
  import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
27
27
  import '../../../../context/ErrorContext/ErrorContext.js';
28
28
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
29
+ import '../../../../context/AccountExistsContext/AccountExistsContext.js';
29
30
  import '../../../IconButton/IconButton.js';
30
31
  import '../../../Alert/Alert.js';
31
32
  import '../../../../context/MockContext/MockContext.js';
@@ -35,6 +36,8 @@ import '../../../Popper/Popper/Popper.js';
35
36
  import '../../../Popper/PopperContext/PopperContext.js';
36
37
  import 'formik';
37
38
  import 'yup';
39
+ import '../../../InlineWidget/InlineWidget.js';
40
+ import '../../../MenuList/Dropdown/Dropdown.js';
38
41
 
39
42
  const UserProfileSection = ({ title, children, }) => (jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsx(Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
40
43
 
@@ -2,13 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _tslib = require('../../../../../../_virtual/_tslib.cjs');
6
5
  var jsxRuntime = require('react/jsx-runtime');
7
- var React = require('react');
8
6
  var iconic = require('@dynamic-labs/iconic');
7
+ require('react');
9
8
  var Typography = require('../../../Typography/Typography.cjs');
10
9
  require('@dynamic-labs/sdk-api');
11
- var logger = require('../../../../shared/logger.cjs');
10
+ require('../../../../shared/logger.cjs');
12
11
  require('@dynamic-labs/wallet-connector-core');
13
12
  require('../../../../context/ViewContext/ViewContext.cjs');
14
13
  var add = require('../../../../shared/assets/add.cjs');
@@ -19,7 +18,7 @@ require('../../../../utils/constants/colors.cjs');
19
18
  require('../../../../shared/utils/classes/storage/localStorage.cjs');
20
19
  require('ethers');
21
20
  require('../../../../shared/consts/index.cjs');
22
- var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
21
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
23
22
  require('@dynamic-labs/multi-wallet');
24
23
  require('../../../ShadowDOM/ShadowDOM.cjs');
25
24
  require('../../../../context/ThemeContext/ThemeContext.cjs');
@@ -29,11 +28,12 @@ require('react-focus-lock');
29
28
  require('../../../Transition/ZoomTransition/ZoomTransition.cjs');
30
29
  require('../../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
31
30
  require('../../../Transition/OpacityTransition/OpacityTransition.cjs');
32
- var api = require('../../../../data/api.cjs');
31
+ require('../../../../config/ApiEndpoint.cjs');
33
32
  require('@dynamic-labs/rpc-providers');
34
33
  require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
35
34
  require('../../../../context/ErrorContext/ErrorContext.cjs');
36
35
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
36
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
37
37
  require('../../../IconButton/IconButton.cjs');
38
38
  var Button = require('../../../Button/Button.cjs');
39
39
  require('../../../Alert/Alert.cjs');
@@ -45,73 +45,24 @@ require('../../../Popper/Popper/Popper.cjs');
45
45
  require('../../../Popper/PopperContext/PopperContext.cjs');
46
46
  require('formik');
47
47
  require('yup');
48
+ require('../../../InlineWidget/InlineWidget.cjs');
49
+ require('../../../MenuList/Dropdown/Dropdown.cjs');
48
50
  var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
49
- var useUpdateUserProfileByJWTCallback = require('../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs');
51
+ var useSocialAccounts = require('../../../../utils/hooks/useSocialAccounts/useSocialAccounts.cjs');
50
52
  var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
51
53
 
52
- const UserProfileSocialAccount = ({ provider, authorizationUrl, verifiedCredential, }) => {
53
- var _a, _b;
54
- const { environmentId, onboardingOnlyJwt, authToken } = useInternalDynamicContext.useInternalDynamicContext();
55
- const { updateUserProfileByJWT } = useUpdateUserProfileByJWTCallback.useUpdateUserProfileByJWTCallback();
56
- const [loading, setLoading] = React.useState(false);
57
- const connectAccount = () => {
58
- setLoading(true);
59
- const authWindow = window.open(authorizationUrl, '_blank', 'width=500,height=600');
60
- const handleAuthWindowMessage = (event) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
61
- var _a, _b;
62
- if (((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) !== 'authorization_response' ||
63
- ((_b = event.data) === null || _b === void 0 ? void 0 : _b.provider) !== provider) {
64
- return;
65
- }
66
- const { code } = event.data;
67
- const jwt = yield api.verifyOAuth(environmentId, provider, {
68
- code,
69
- }, String(authToken || onboardingOnlyJwt));
70
- if (!jwt) {
71
- return;
72
- }
73
- yield updateUserProfileByJWT(jwt);
74
- setLoading(false);
75
- });
76
- window.addEventListener('message', handleAuthWindowMessage);
77
- const authWindowInterval = setInterval(() => {
78
- if (authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed) {
79
- window.removeEventListener('message', handleAuthWindowMessage);
80
- clearInterval(authWindowInterval);
81
- setLoading(false);
82
- }
83
- }, 1000);
84
- };
85
- const disconnectAccount = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
86
- var _c;
87
- try {
88
- setLoading(true);
89
- const jwt = yield api.unlinkOAuth({
90
- environmentId,
91
- verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
92
- }, String(authToken || onboardingOnlyJwt));
93
- if (!jwt) {
94
- return;
95
- }
96
- updateUserProfileByJWT(jwt);
97
- }
98
- catch (err) {
99
- logger.logger.error(err);
100
- }
101
- finally {
102
- setLoading(false);
103
- }
104
- });
54
+ const UserProfileSocialAccount = ({ provider, }) => {
55
+ var _a;
56
+ const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts.useSocialAccounts();
57
+ const isProviderLinked = isLinked(provider);
58
+ const connectedAccountInfo = getLinkedAccountInformation(provider);
105
59
  const iconThemeVariant = useIconThemeVariant.useIconThemeVariant();
106
- if (!verifiedCredential && !authorizationUrl) {
107
- return null;
108
- }
109
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: verifiedCredential ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: (_a = verifiedCredential.oauthAccountPhotos) === null || _a === void 0 ? void 0 : _a[0], iconThemeVariant: iconThemeVariant })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_b = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.publicIdentifier) !== null && _b !== void 0 ? _b : helpers.capitalize(provider) })) })), verifiedCredential ? (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: disconnectAccount, loading: loading, dataTestId: 'social-account-disconnect-button', typographyProps: {
60
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar, iconThemeVariant: iconThemeVariant })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : helpers.capitalize(provider) })) })), isProviderLinked ? (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => unlinkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-disconnect-button', typographyProps: {
110
61
  color: 'secondary',
111
62
  variant: 'button_tertiary',
112
63
  }, startSlot:
113
64
  // eslint-disable-next-line react/jsx-wrap-multilines
114
- jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsxRuntime.jsx(unlink.ReactComponent, {}) })) })) : (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: connectAccount, loading: loading, dataTestId: 'social-account-connect-button', typographyProps: {
65
+ jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsxRuntime.jsx(unlink.ReactComponent, {}) })) })) : (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => linkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-connect-button', typographyProps: {
115
66
  color: 'secondary',
116
67
  variant: 'button_tertiary',
117
68
  weight: 'medium',
@@ -1,8 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { JwtVerifiedCredential, ProviderEnum } from '@dynamic-labs/sdk-api';
2
+ import { ProviderEnum } from '@dynamic-labs/sdk-api';
3
3
  export type UserProfileSocialAccountProps = {
4
- authorizationUrl: string | undefined;
5
4
  provider: ProviderEnum;
6
- verifiedCredential: JwtVerifiedCredential | null;
7
5
  };
8
- export declare const UserProfileSocialAccount: ({ provider, authorizationUrl, verifiedCredential, }: UserProfileSocialAccountProps) => JSX.Element | null;
6
+ export declare const UserProfileSocialAccount: ({ provider, }: UserProfileSocialAccountProps) => JSX.Element;
@@ -1,10 +1,9 @@
1
- import { __awaiter } from '../../../../../../_virtual/_tslib.js';
2
1
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { useState } from 'react';
4
2
  import { SocialIcon } from '@dynamic-labs/iconic';
3
+ import 'react';
5
4
  import { Typography } from '../../../Typography/Typography.js';
6
5
  import '@dynamic-labs/sdk-api';
7
- import { logger } from '../../../../shared/logger.js';
6
+ import '../../../../shared/logger.js';
8
7
  import '@dynamic-labs/wallet-connector-core';
9
8
  import '../../../../context/ViewContext/ViewContext.js';
10
9
  import { ReactComponent as SvgAdd } from '../../../../shared/assets/add.js';
@@ -15,7 +14,7 @@ import '../../../../utils/constants/colors.js';
15
14
  import '../../../../shared/utils/classes/storage/localStorage.js';
16
15
  import 'ethers';
17
16
  import '../../../../shared/consts/index.js';
18
- import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
17
+ import '../../../../context/DynamicContext/DynamicContext.js';
19
18
  import '@dynamic-labs/multi-wallet';
20
19
  import '../../../ShadowDOM/ShadowDOM.js';
21
20
  import '../../../../context/ThemeContext/ThemeContext.js';
@@ -25,11 +24,12 @@ import 'react-focus-lock';
25
24
  import '../../../Transition/ZoomTransition/ZoomTransition.js';
26
25
  import '../../../Transition/SlideInUpTransition/SlideInUpTransition.js';
27
26
  import '../../../Transition/OpacityTransition/OpacityTransition.js';
28
- import { unlinkOAuth, verifyOAuth } from '../../../../data/api.js';
27
+ import '../../../../config/ApiEndpoint.js';
29
28
  import '@dynamic-labs/rpc-providers';
30
29
  import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
31
30
  import '../../../../context/ErrorContext/ErrorContext.js';
32
31
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
32
+ import '../../../../context/AccountExistsContext/AccountExistsContext.js';
33
33
  import '../../../IconButton/IconButton.js';
34
34
  import { Button } from '../../../Button/Button.js';
35
35
  import '../../../Alert/Alert.js';
@@ -41,73 +41,24 @@ import '../../../Popper/Popper/Popper.js';
41
41
  import '../../../Popper/PopperContext/PopperContext.js';
42
42
  import 'formik';
43
43
  import 'yup';
44
+ import '../../../InlineWidget/InlineWidget.js';
45
+ import '../../../MenuList/Dropdown/Dropdown.js';
44
46
  import { capitalize } from '../../../../widgets/DynamicWidget/helpers/helpers.js';
45
- import { useUpdateUserProfileByJWTCallback } from '../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js';
47
+ import { useSocialAccounts } from '../../../../utils/hooks/useSocialAccounts/useSocialAccounts.js';
46
48
  import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
47
49
 
48
- const UserProfileSocialAccount = ({ provider, authorizationUrl, verifiedCredential, }) => {
49
- var _a, _b;
50
- const { environmentId, onboardingOnlyJwt, authToken } = useInternalDynamicContext();
51
- const { updateUserProfileByJWT } = useUpdateUserProfileByJWTCallback();
52
- const [loading, setLoading] = useState(false);
53
- const connectAccount = () => {
54
- setLoading(true);
55
- const authWindow = window.open(authorizationUrl, '_blank', 'width=500,height=600');
56
- const handleAuthWindowMessage = (event) => __awaiter(void 0, void 0, void 0, function* () {
57
- var _a, _b;
58
- if (((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) !== 'authorization_response' ||
59
- ((_b = event.data) === null || _b === void 0 ? void 0 : _b.provider) !== provider) {
60
- return;
61
- }
62
- const { code } = event.data;
63
- const jwt = yield verifyOAuth(environmentId, provider, {
64
- code,
65
- }, String(authToken || onboardingOnlyJwt));
66
- if (!jwt) {
67
- return;
68
- }
69
- yield updateUserProfileByJWT(jwt);
70
- setLoading(false);
71
- });
72
- window.addEventListener('message', handleAuthWindowMessage);
73
- const authWindowInterval = setInterval(() => {
74
- if (authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed) {
75
- window.removeEventListener('message', handleAuthWindowMessage);
76
- clearInterval(authWindowInterval);
77
- setLoading(false);
78
- }
79
- }, 1000);
80
- };
81
- const disconnectAccount = () => __awaiter(void 0, void 0, void 0, function* () {
82
- var _c;
83
- try {
84
- setLoading(true);
85
- const jwt = yield unlinkOAuth({
86
- environmentId,
87
- verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
88
- }, String(authToken || onboardingOnlyJwt));
89
- if (!jwt) {
90
- return;
91
- }
92
- updateUserProfileByJWT(jwt);
93
- }
94
- catch (err) {
95
- logger.error(err);
96
- }
97
- finally {
98
- setLoading(false);
99
- }
100
- });
50
+ const UserProfileSocialAccount = ({ provider, }) => {
51
+ var _a;
52
+ const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts();
53
+ const isProviderLinked = isLinked(provider);
54
+ const connectedAccountInfo = getLinkedAccountInformation(provider);
101
55
  const iconThemeVariant = useIconThemeVariant();
102
- if (!verifiedCredential && !authorizationUrl) {
103
- return null;
104
- }
105
- return (jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: verifiedCredential ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: (_a = verifiedCredential.oauthAccountPhotos) === null || _a === void 0 ? void 0 : _a[0], iconThemeVariant: iconThemeVariant })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_b = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.publicIdentifier) !== null && _b !== void 0 ? _b : capitalize(provider) })) })), verifiedCredential ? (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: disconnectAccount, loading: loading, dataTestId: 'social-account-disconnect-button', typographyProps: {
56
+ return (jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar, iconThemeVariant: iconThemeVariant })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : capitalize(provider) })) })), isProviderLinked ? (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => unlinkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-disconnect-button', typographyProps: {
106
57
  color: 'secondary',
107
58
  variant: 'button_tertiary',
108
59
  }, startSlot:
109
60
  // eslint-disable-next-line react/jsx-wrap-multilines
110
- jsx(Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsx(SvgUnlink, {}) })) })) : (jsx(Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: connectAccount, loading: loading, dataTestId: 'social-account-connect-button', typographyProps: {
61
+ jsx(Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsx(SvgUnlink, {}) })) })) : (jsx(Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => linkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-connect-button', typographyProps: {
111
62
  color: 'secondary',
112
63
  variant: 'button_tertiary',
113
64
  weight: 'medium',
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var React = require('react');
7
+ var Typography = require('../Typography/Typography.cjs');
8
+ require('@dynamic-labs/sdk-api');
9
+ require('../../shared/logger.cjs');
10
+ require('@dynamic-labs/iconic');
11
+ require('@dynamic-labs/wallet-connector-core');
12
+ require('../../context/ViewContext/ViewContext.cjs');
13
+ require('@dynamic-labs/wallet-book');
14
+ var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
15
+ require('@dynamic-labs/utils');
16
+ require('../../utils/constants/colors.cjs');
17
+ require('../../shared/utils/classes/storage/localStorage.cjs');
18
+ require('ethers');
19
+ require('../../shared/consts/index.cjs');
20
+ var Icon = require('../Icon/Icon.cjs');
21
+
22
+ const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
23
+ const details = React.useMemo(() => {
24
+ const shortenAddress = shortenWalletAddress.shortenWalletAddress(address, 4, 4);
25
+ if (ens) {
26
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal', truncate: true }, { children: ens })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: shortenAddress }))] }));
27
+ }
28
+ return (jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: shortenAddress })));
29
+ }, [ens, address]);
30
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__header' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__details-container' }, { children: [icon && (jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'wallet-information-card__icon' }, { children: icon }))), jsxRuntime.jsx("div", Object.assign({ className: 'wallet-information-card__details' }, { children: details })), jsxRuntime.jsx("div", Object.assign({ className: 'wallet-information-card__menu' }, { children: menu }))] })), network] })), jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__balance-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_small' }, { children: "Balance" })), balance] }))] })));
31
+ };
32
+
33
+ exports.WalletInformationCard = WalletInformationCard;