@dynamic-labs/sdk-react-core 0.18.0-RC.6 → 0.18.0-RC.8

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 (210) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +8 -8
  5. package/src/index.cjs +6 -0
  6. package/src/index.js +3 -0
  7. package/src/lib/Main.cjs +2 -2
  8. package/src/lib/Main.js +2 -2
  9. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +5 -3
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +6 -4
  11. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.types.d.ts +1 -0
  12. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -5
  13. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +1 -9
  14. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -4
  15. package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +11 -0
  16. package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +9 -0
  17. package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +7 -0
  18. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +1 -1
  19. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +26 -1
  20. package/src/lib/components/NetworkPicker/NetworkPicker.js +26 -1
  21. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +3 -1
  22. package/src/lib/components/NetworkPicker/components/Network/Network.d.ts +2 -1
  23. package/src/lib/components/NetworkPicker/components/Network/Network.js +3 -1
  24. package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.cjs +6 -1
  25. package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +2 -1
  26. package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.js +6 -1
  27. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -3
  28. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
  29. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -3
  30. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +2 -1
  31. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +2 -1
  32. package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
  33. package/src/lib/components/Tooltip/Tooltip.js +1 -1
  34. package/src/lib/components/TosAndPp/TosAndPp.cjs +6 -5
  35. package/src/lib/components/TosAndPp/TosAndPp.d.ts +3 -4
  36. package/src/lib/components/TosAndPp/TosAndPp.js +6 -5
  37. package/src/lib/components/Transition/transition.type.d.ts +3 -3
  38. package/src/lib/context/DynamicContext/DynamicContext.cjs +28 -18
  39. package/src/lib/context/DynamicContext/DynamicContext.d.ts +4 -1
  40. package/src/lib/context/DynamicContext/DynamicContext.js +29 -19
  41. package/src/lib/context/DynamicContext/helpers.cjs +1 -2
  42. package/src/lib/context/DynamicContext/helpers.js +1 -2
  43. package/src/lib/context/ErrorContext/ErrorContext.cjs +6 -0
  44. package/src/lib/context/ErrorContext/ErrorContext.js +6 -0
  45. package/src/lib/context/MockContext/MockContext.cjs +2 -14
  46. package/src/lib/context/MockContext/MockContext.js +2 -14
  47. package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
  48. package/src/lib/context/WalletContext/WalletContext.cjs +46 -0
  49. package/src/lib/context/WalletContext/WalletContext.d.ts +7 -0
  50. package/src/lib/context/WalletContext/WalletContext.js +41 -0
  51. package/src/lib/context/WalletContext/index.d.ts +1 -0
  52. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +22 -63
  53. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.d.ts +1 -6
  54. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +23 -64
  55. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +34 -15
  56. package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +1 -1
  57. package/src/lib/layout/DynamicAuthLayout/Header/header.js +35 -16
  58. package/src/lib/layout/DynamicAuthLayout/Header/header.types.d.ts +2 -0
  59. package/src/lib/layout/DynamicAuthLayout/{FooterContent/EmptyFooterContent/empty-footer-content.cjs → HelpContent/EmptyHelpContent/EmptyHelpContent.cjs} +2 -2
  60. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.d.ts +2 -0
  61. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.js +6 -0
  62. package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/index.d.ts +1 -0
  63. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +36 -0
  64. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.d.ts +2 -0
  65. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +32 -0
  66. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +56 -0
  67. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.d.ts +2 -0
  68. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +52 -0
  69. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/index.d.ts +1 -0
  70. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.cjs → HelpContent/WalletListHelpContent/WalletListHelpContent.cjs} +3 -3
  71. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.d.ts → HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts} +1 -1
  72. package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.js → HelpContent/WalletListHelpContent/WalletListHelpContent.js} +3 -3
  73. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/index.d.ts +1 -0
  74. package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -5
  75. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +7 -0
  76. package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -5
  77. package/src/lib/layout/DynamicAuthLayout/HelpContent/index.d.ts +4 -0
  78. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +49 -0
  79. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.d.ts +2 -0
  80. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +45 -0
  81. package/src/lib/layout/DynamicAuthLayout/ToSFooter/index.d.ts +1 -0
  82. package/src/lib/shared/assets/chevron-left.cjs +5 -5
  83. package/src/lib/shared/assets/chevron-left.js +5 -5
  84. package/src/lib/shared/assets/close.cjs +5 -5
  85. package/src/lib/shared/assets/close.js +5 -5
  86. package/src/lib/shared/assets/footer-info-icon.cjs +2 -2
  87. package/src/lib/shared/assets/footer-info-icon.js +2 -2
  88. package/src/lib/shared/assets/index.d.ts +1 -0
  89. package/src/lib/shared/assets/question-mark.cjs +58 -0
  90. package/src/lib/shared/assets/question-mark.js +34 -0
  91. package/src/lib/shared/utils/hooks/index.d.ts +1 -0
  92. package/src/lib/shared/utils/hooks/useMediaQuery/index.d.ts +1 -0
  93. package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.cjs +31 -0
  94. package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
  95. package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.js +27 -0
  96. package/src/lib/styles/index.shadow.cjs +1 -1
  97. package/src/lib/styles/index.shadow.js +1 -1
  98. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +7 -27
  99. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.d.ts +3 -4
  100. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +8 -28
  101. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +1 -1
  102. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -1
  103. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -1
  104. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -1
  105. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
  106. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
  107. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +13 -0
  108. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +13 -0
  109. package/src/lib/utils/hooks/index.d.ts +4 -0
  110. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +9 -1
  111. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +9 -1
  112. package/src/lib/utils/hooks/useAuthLayoutChecks/index.d.ts +1 -0
  113. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +68 -0
  114. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +10 -0
  115. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +64 -0
  116. package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +16 -18
  117. package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +16 -18
  118. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +20 -6
  119. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +14 -2
  120. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +20 -6
  121. package/src/lib/utils/hooks/useCountdown/useCountdown.cjs +39 -0
  122. package/src/lib/utils/hooks/useCountdown/useCountdown.d.ts +11 -0
  123. package/src/lib/utils/hooks/useCountdown/useCountdown.js +35 -0
  124. package/src/lib/utils/hooks/useInterval/useInterval.d.ts +1 -0
  125. package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +10 -0
  126. package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -0
  127. package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +6 -0
  128. package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs +6 -8
  129. package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js +7 -9
  130. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +6 -28
  131. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +0 -1
  132. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +7 -29
  133. package/src/lib/utils/hooks/useTimeout/useTimeout.cjs +27 -0
  134. package/src/lib/utils/hooks/useTimeout/useTimeout.d.ts +1 -0
  135. package/src/lib/utils/hooks/useTimeout/useTimeout.js +23 -0
  136. package/src/lib/utils/hooks/useTransition/useTransition.cjs +16 -24
  137. package/src/lib/utils/hooks/useTransition/useTransition.d.ts +3 -3
  138. package/src/lib/utils/hooks/useTransition/useTransition.js +17 -25
  139. package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.cjs +11 -9
  140. package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.js +11 -9
  141. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -1
  142. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -1
  143. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +1 -0
  144. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +1 -0
  145. package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -1
  146. package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -1
  147. package/src/lib/utils/hooks/useWallets/useWallets.js +4 -1
  148. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -3
  149. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -3
  150. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -1
  151. package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -1
  152. package/src/lib/views/EmailVerification/EmailVerification.cjs +13 -23
  153. package/src/lib/views/EmailVerification/EmailVerification.js +14 -24
  154. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
  155. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
  156. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +3 -0
  157. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +3 -0
  158. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -1
  159. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -1
  160. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
  161. package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
  162. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -3
  163. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -3
  164. package/src/lib/views/QrCodeView/QRCode.cjs +36 -4
  165. package/src/lib/views/QrCodeView/QRCode.js +37 -5
  166. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -2
  167. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +1 -3
  168. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -2
  169. package/src/lib/views/QrCodeView/QrCodeView.cjs +5 -8
  170. package/src/lib/views/QrCodeView/QrCodeView.js +5 -8
  171. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -4
  172. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -4
  173. package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +15 -0
  174. package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +15 -0
  175. package/src/lib/views/WalletList/data.cjs +2 -1
  176. package/src/lib/views/WalletList/data.js +2 -1
  177. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +63 -0
  178. package/src/lib/views/WalletLockedView/WalletLockedView.d.ts +2 -0
  179. package/src/lib/views/WalletLockedView/WalletLockedView.js +59 -0
  180. package/src/lib/views/WalletLockedView/index.d.ts +1 -0
  181. package/src/lib/views/viewToComponentMap.cjs +2 -0
  182. package/src/lib/views/viewToComponentMap.js +2 -0
  183. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +2 -2
  184. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +2 -2
  185. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs +23 -0
  186. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.d.ts +8 -0
  187. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js +19 -0
  188. package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +1 -0
  189. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +0 -67
  190. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.d.ts +0 -10
  191. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +0 -63
  192. package/src/lib/layout/DynamicAuthLayout/Footer/index.d.ts +0 -1
  193. package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.d.ts +0 -2
  194. package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.js +0 -6
  195. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/index.d.ts +0 -1
  196. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -8
  197. package/src/lib/layout/DynamicAuthLayout/FooterContent/index.d.ts +0 -3
  198. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.cjs +0 -0
  199. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.d.ts +0 -0
  200. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.js +0 -0
  201. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/index.d.ts +0 -0
  202. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +0 -0
  203. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +0 -0
  204. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.js +0 -0
  205. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/index.d.ts +0 -0
  206. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +0 -0
  207. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.d.ts +0 -0
  208. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +0 -0
  209. /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/index.d.ts +0 -0
  210. /package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/index.d.ts +0 -0
@@ -9,10 +9,11 @@ type Props = {
9
9
  networkConfigurations: NetworkConfigurationMap | undefined;
10
10
  projectSettings: ProjectSettings | undefined;
11
11
  walletBook: WalletBookSchema;
12
+ walletConnectV1Bridge?: string;
12
13
  walletConnectorsProp?: WalletConnectorsMethod[];
13
14
  walletUiUtils: WalletUiUtils;
14
15
  };
15
- export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletUiUtils, walletConnectorsProp, }: Props) => {
16
+ export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }: Props) => {
16
17
  wallets: import("../../../shared").WalletOption[];
17
18
  };
18
19
  export {};
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import { getInstalledWallets, getNotInstalledWallets } from '../../../views/WalletList/data.js';
3
3
 
4
- const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletUiUtils, walletConnectorsProp, }) => {
4
+ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
5
5
  const wallets = useMemo(() => {
6
6
  if (!projectSettings || !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length)
7
7
  return [];
@@ -13,6 +13,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
13
13
  networkConfigurations,
14
14
  skipMemo: true,
15
15
  walletBook,
16
+ walletConnectV1Bridge,
16
17
  walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
17
18
  walletUiUtils,
18
19
  });
@@ -24,6 +25,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
24
25
  networkConfigurations,
25
26
  skipMemo: true,
26
27
  walletBook,
28
+ walletConnectV1Bridge,
27
29
  walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
28
30
  walletUiUtils,
29
31
  });
@@ -35,6 +37,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
35
37
  networkConfigurations,
36
38
  projectSettings,
37
39
  walletConnectorsProp,
40
+ walletConnectV1Bridge,
38
41
  flowNetwork,
39
42
  Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length,
40
43
  ]);
@@ -41,7 +41,6 @@ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondar
41
41
  require('../../context/MockContext/MockContext.cjs');
42
42
  require('../../context/CaptchaContext/CaptchaContext.cjs');
43
43
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
44
- var TosAndPp = require('../../components/TosAndPp/TosAndPp.cjs');
45
44
  require('../../components/Popper/Popper/Popper.cjs');
46
45
  require('../../components/Popper/PopperContext/PopperContext.cjs');
47
46
  require('formik');
@@ -49,7 +48,7 @@ require('yup');
49
48
 
50
49
  const EmailConfirmationWaitingView = () => {
51
50
  const { setView } = ViewContext.useViewContext();
52
- const { clearStatesOnBackClick, termsOfServiceUrl, privacyPolicyUrl, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
51
+ const { clearStatesOnBackClick, selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
53
52
  if (walletConnector && !walletConnectorCore.isEmailWalletConnector(walletConnector)) {
54
53
  throw new Error('Wallet connector is not email provider');
55
54
  }
@@ -59,7 +58,7 @@ const EmailConfirmationWaitingView = () => {
59
58
  setView('login-with-email-or-wallet');
60
59
  clearStatesOnBackClick();
61
60
  }), [setView, emailConnector, clearStatesOnBackClick]);
62
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__header-icon' }, { children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title' }, { children: "Confirm your email" })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' '] })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view__email-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email })), jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary' }, { children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) })) }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__note' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" })) })), jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__term_of_service' }, { children: jsxRuntime.jsx(TosAndPp.TosAndPp, { mode: 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }) })), jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__powered_by_dynamic_footer' }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) }))] })));
61
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__header-icon' }, { children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title' }, { children: "Confirm your email" })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' '] })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view__email-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email })), jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary' }, { children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) })) }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__note' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" })) })), jsxRuntime.jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__powered_by_dynamic_footer' }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) }))] })));
63
62
  };
64
63
 
65
64
  exports.EmailConfirmationWaitingView = EmailConfirmationWaitingView;
@@ -37,7 +37,6 @@ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondary
37
37
  import '../../context/MockContext/MockContext.js';
38
38
  import '../../context/CaptchaContext/CaptchaContext.js';
39
39
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
40
- import { TosAndPp } from '../../components/TosAndPp/TosAndPp.js';
41
40
  import '../../components/Popper/Popper/Popper.js';
42
41
  import '../../components/Popper/PopperContext/PopperContext.js';
43
42
  import 'formik';
@@ -45,7 +44,7 @@ import 'yup';
45
44
 
46
45
  const EmailConfirmationWaitingView = () => {
47
46
  const { setView } = useViewContext();
48
- const { clearStatesOnBackClick, termsOfServiceUrl, privacyPolicyUrl, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
47
+ const { clearStatesOnBackClick, selectedWalletConnector: walletConnector } = useInternalDynamicContext();
49
48
  if (walletConnector && !isEmailWalletConnector(walletConnector)) {
50
49
  throw new Error('Wallet connector is not email provider');
51
50
  }
@@ -55,7 +54,7 @@ const EmailConfirmationWaitingView = () => {
55
54
  setView('login-with-email-or-wallet');
56
55
  clearStatesOnBackClick();
57
56
  }), [setView, emailConnector, clearStatesOnBackClick]);
58
- return (jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view' }, { children: [jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__header-icon' }, { children: jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title' }, { children: "Confirm your email" })), jsxs(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' '] })), jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view__email-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email })), jsx(IconButton, Object.assign({ onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button' }, { children: jsx(Icon, Object.assign({ color: 'text-tertiary' }, { children: jsx(SvgPencilAltIcon, {}) })) }))] })), jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__note' }, { children: jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" })) })), jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__term_of_service' }, { children: jsx(TosAndPp, { mode: 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl }) })), jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__powered_by_dynamic_footer' }, { children: jsx(PoweredByDynamic, {}) }))] })));
57
+ return (jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view' }, { children: [jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__header-icon' }, { children: jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title' }, { children: "Confirm your email" })), jsxs(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' '] })), jsxs("div", Object.assign({ className: 'email-confirmation-waiting-view__email-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email })), jsx(IconButton, Object.assign({ onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button' }, { children: jsx(Icon, Object.assign({ color: 'text-tertiary' }, { children: jsx(SvgPencilAltIcon, {}) })) }))] })), jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__note' }, { children: jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" })) })), jsx("div", Object.assign({ className: 'email-confirmation-waiting-view__powered_by_dynamic_footer' }, { children: jsx(PoweredByDynamic, {}) }))] })));
59
58
  };
60
59
 
61
60
  export { EmailConfirmationWaitingView };
@@ -8,7 +8,7 @@ var React = require('react');
8
8
  var iconic = require('@dynamic-labs/iconic');
9
9
  var Typography = require('../../components/Typography/Typography.cjs');
10
10
  require('@dynamic-labs/sdk-api');
11
- require('../../shared/logger.cjs');
11
+ var logger = require('../../shared/logger.cjs');
12
12
  require('@dynamic-labs/wallet-connector-core');
13
13
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
14
14
  var chevronLeft = require('../../shared/assets/chevron-left.cjs');
@@ -76,6 +76,7 @@ const EmailUpdate = () => {
76
76
  setVerificationUUID(emailVerification.verificationUUID);
77
77
  }
78
78
  catch (error) {
79
+ logger.logger.debug(error);
79
80
  setErrorMessage(error.code);
80
81
  }
81
82
  finally {
@@ -4,7 +4,7 @@ import { useState } from 'react';
4
4
  import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
5
5
  import { Typography } from '../../components/Typography/Typography.js';
6
6
  import '@dynamic-labs/sdk-api';
7
- import '../../shared/logger.js';
7
+ import { logger } from '../../shared/logger.js';
8
8
  import '@dynamic-labs/wallet-connector-core';
9
9
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
10
10
  import { ReactComponent as SvgChevronLeft } from '../../shared/assets/chevron-left.js';
@@ -72,6 +72,7 @@ const EmailUpdate = () => {
72
72
  setVerificationUUID(emailVerification.verificationUUID);
73
73
  }
74
74
  catch (error) {
75
+ logger.debug(error);
75
76
  setErrorMessage(error.code);
76
77
  }
77
78
  finally {
@@ -13,7 +13,7 @@ require('@dynamic-labs/wallet-connector-core');
13
13
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
14
14
  var check = require('../../shared/assets/check.cjs');
15
15
  var checkCircle = require('../../shared/assets/check-circle.cjs');
16
- require('../../shared/logger.cjs');
16
+ var logger = require('../../shared/logger.cjs');
17
17
  require('@dynamic-labs/wallet-book');
18
18
  require('../../utils/constants/colors.cjs');
19
19
  require('../../shared/utils/classes/storage/localStorage.cjs');
@@ -44,9 +44,9 @@ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondar
44
44
  require('../../context/MockContext/MockContext.cjs');
45
45
  require('../../context/CaptchaContext/CaptchaContext.cjs');
46
46
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
47
+ var useCountdown = require('../../utils/hooks/useCountdown/useCountdown.cjs');
47
48
  var TextButton = require('../../components/TextButton/TextButton.cjs');
48
49
  var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
49
- var TosAndPp = require('../../components/TosAndPp/TosAndPp.cjs');
50
50
  var PinField = require('../../components/PinField/PinField.cjs');
51
51
  var shortenEmail = require('../../shared/utils/functions/shortenEmail/shortenEmail.cjs');
52
52
  require('../../components/Popper/Popper/Popper.cjs');
@@ -58,18 +58,21 @@ var LoadingContext = require('../../context/LoadingContext/LoadingContext.cjs');
58
58
  var useEmailVerificationRequest = require('../../utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs');
59
59
  var useCreateUserProfileByJWTCallback = require('../../utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs');
60
60
 
61
- const secondsToRetry = 15;
61
+ const SECONDS_TO_RETRY = 15;
62
62
  const EmailVerification = () => {
63
63
  const [hideRetryButton, setHideRetryButton] = React.useState(false);
64
- const [count, setCount] = React.useState(secondsToRetry);
65
64
  const [retried, setRetried] = React.useState(false);
66
65
  const [isValidated, setIsValidated] = React.useState(false);
67
66
  const [showTransferMessage, setShowTransferMessage] = React.useState(false);
68
67
  const { view, setView, goToInitialView } = ViewContext.useViewContext();
69
68
  const { error, setError, setErrorMessage } = ErrorContext.useErrorContext();
70
- const { environmentId, onboardingOnlyJwt, handleLogOut, termsOfServiceUrl, privacyPolicyUrl, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
69
+ const { environmentId, onboardingOnlyJwt, handleLogOut, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
71
70
  const { email, verificationUUID, setVerificationUUID } = EmailVerificationContext.useEmailVerificationContext();
72
71
  const { loading, setLoading } = LoadingContext.useLoadingContext();
72
+ const { remainingSeconds, startCountdown } = useCountdown.useCountdown({
73
+ callback: () => setRetried(false),
74
+ seconds: SECONDS_TO_RETRY,
75
+ });
73
76
  const isLoginView = view === 'login-with-email-verification';
74
77
  const { verifyEmail } = useEmailVerificationRequest.useEmailVerificationRequest();
75
78
  const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback.useCreateUserProfileByJWTCallback();
@@ -94,6 +97,7 @@ const EmailVerification = () => {
94
97
  setShowAuthFlow(false);
95
98
  }
96
99
  catch (error) {
100
+ logger.logger.debug(error);
97
101
  setErrorMessage(error.code);
98
102
  }
99
103
  finally {
@@ -152,6 +156,7 @@ const EmailVerification = () => {
152
156
  if (error instanceof utils.NoAccessError) {
153
157
  setView('no-access');
154
158
  }
159
+ logger.logger.debug(error);
155
160
  setErrorMessage(error.code);
156
161
  }
157
162
  finally {
@@ -184,9 +189,11 @@ const EmailVerification = () => {
184
189
  });
185
190
  setVerificationUUID(newVerificationUUID);
186
191
  setRetried(true);
192
+ startCountdown();
187
193
  setError(undefined);
188
194
  }
189
195
  catch (error) {
196
+ logger.logger.debug(error);
190
197
  setErrorMessage(error.code);
191
198
  if (error.code === 'too_many_email_verification_attempts') {
192
199
  setHideRetryButton(true);
@@ -199,26 +206,9 @@ const EmailVerification = () => {
199
206
  setLoading(false);
200
207
  }
201
208
  });
202
- React.useEffect(() => {
203
- /* istanbul ignore next */
204
- setCount(secondsToRetry);
205
- const timeout = setTimeout(() => {
206
- if (retried)
207
- setRetried(false);
208
- }, secondsToRetry * 1000);
209
- return () => clearTimeout(timeout);
210
- }, [retried]);
211
- React.useEffect(() => {
212
- /* istanbul ignore next */
213
- const timeout = setTimeout(() => {
214
- if (count)
215
- setCount((prev) => prev - 1);
216
- }, 1000);
217
- return () => clearTimeout(timeout);
218
- }, [count]);
219
209
  return (jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), isValidated ? (jsxRuntime.jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent }) }))) : (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { className: classNames.classNames({
220
210
  'email-verification__icon-with-spinner': Boolean(!error),
221
- }), Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) }))] })), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", count] })), jsxRuntime.jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))), termsOfServiceUrl && privacyPolicyUrl && isLoginView && (jsxRuntime.jsx(TosAndPp.TosAndPp, { mode: 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] })));
211
+ }), Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxRuntime.jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) }))] })), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxRuntime.jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsxRuntime.jsx(checkCircle.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'email-verification__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] })));
222
212
  };
223
213
 
224
214
  exports.EmailVerification = EmailVerification;
@@ -1,6 +1,6 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
- import { useState, useCallback, useEffect } from 'react';
3
+ import { useState, useCallback } from 'react';
4
4
  import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
5
5
  import { NoAccessError } from '@dynamic-labs/utils';
6
6
  import { Typography } from '../../components/Typography/Typography.js';
@@ -9,7 +9,7 @@ import '@dynamic-labs/wallet-connector-core';
9
9
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
10
10
  import { ReactComponent as SvgCheck } from '../../shared/assets/check.js';
11
11
  import { ReactComponent as SvgCheckCircle } from '../../shared/assets/check-circle.js';
12
- import '../../shared/logger.js';
12
+ import { logger } from '../../shared/logger.js';
13
13
  import '@dynamic-labs/wallet-book';
14
14
  import '../../utils/constants/colors.js';
15
15
  import '../../shared/utils/classes/storage/localStorage.js';
@@ -40,9 +40,9 @@ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondary
40
40
  import '../../context/MockContext/MockContext.js';
41
41
  import '../../context/CaptchaContext/CaptchaContext.js';
42
42
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
43
+ import { useCountdown } from '../../utils/hooks/useCountdown/useCountdown.js';
43
44
  import { TextButton } from '../../components/TextButton/TextButton.js';
44
45
  import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
45
- import { TosAndPp } from '../../components/TosAndPp/TosAndPp.js';
46
46
  import { PinField } from '../../components/PinField/PinField.js';
47
47
  import { shortenEmail } from '../../shared/utils/functions/shortenEmail/shortenEmail.js';
48
48
  import '../../components/Popper/Popper/Popper.js';
@@ -54,18 +54,21 @@ import { useLoadingContext } from '../../context/LoadingContext/LoadingContext.j
54
54
  import { useEmailVerificationRequest } from '../../utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js';
55
55
  import { useCreateUserProfileByJWTCallback } from '../../utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js';
56
56
 
57
- const secondsToRetry = 15;
57
+ const SECONDS_TO_RETRY = 15;
58
58
  const EmailVerification = () => {
59
59
  const [hideRetryButton, setHideRetryButton] = useState(false);
60
- const [count, setCount] = useState(secondsToRetry);
61
60
  const [retried, setRetried] = useState(false);
62
61
  const [isValidated, setIsValidated] = useState(false);
63
62
  const [showTransferMessage, setShowTransferMessage] = useState(false);
64
63
  const { view, setView, goToInitialView } = useViewContext();
65
64
  const { error, setError, setErrorMessage } = useErrorContext();
66
- const { environmentId, onboardingOnlyJwt, handleLogOut, termsOfServiceUrl, privacyPolicyUrl, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext();
65
+ const { environmentId, onboardingOnlyJwt, handleLogOut, authToken, setOnboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext();
67
66
  const { email, verificationUUID, setVerificationUUID } = useEmailVerificationContext();
68
67
  const { loading, setLoading } = useLoadingContext();
68
+ const { remainingSeconds, startCountdown } = useCountdown({
69
+ callback: () => setRetried(false),
70
+ seconds: SECONDS_TO_RETRY,
71
+ });
69
72
  const isLoginView = view === 'login-with-email-verification';
70
73
  const { verifyEmail } = useEmailVerificationRequest();
71
74
  const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback();
@@ -90,6 +93,7 @@ const EmailVerification = () => {
90
93
  setShowAuthFlow(false);
91
94
  }
92
95
  catch (error) {
96
+ logger.debug(error);
93
97
  setErrorMessage(error.code);
94
98
  }
95
99
  finally {
@@ -148,6 +152,7 @@ const EmailVerification = () => {
148
152
  if (error instanceof NoAccessError) {
149
153
  setView('no-access');
150
154
  }
155
+ logger.debug(error);
151
156
  setErrorMessage(error.code);
152
157
  }
153
158
  finally {
@@ -180,9 +185,11 @@ const EmailVerification = () => {
180
185
  });
181
186
  setVerificationUUID(newVerificationUUID);
182
187
  setRetried(true);
188
+ startCountdown();
183
189
  setError(undefined);
184
190
  }
185
191
  catch (error) {
192
+ logger.debug(error);
186
193
  setErrorMessage(error.code);
187
194
  if (error.code === 'too_many_email_verification_attempts') {
188
195
  setHideRetryButton(true);
@@ -195,26 +202,9 @@ const EmailVerification = () => {
195
202
  setLoading(false);
196
203
  }
197
204
  });
198
- useEffect(() => {
199
- /* istanbul ignore next */
200
- setCount(secondsToRetry);
201
- const timeout = setTimeout(() => {
202
- if (retried)
203
- setRetried(false);
204
- }, secondsToRetry * 1000);
205
- return () => clearTimeout(timeout);
206
- }, [retried]);
207
- useEffect(() => {
208
- /* istanbul ignore next */
209
- const timeout = setTimeout(() => {
210
- if (count)
211
- setCount((prev) => prev - 1);
212
- }, 1000);
213
- return () => clearTimeout(timeout);
214
- }, [count]);
215
205
  return (jsxs("div", Object.assign({ className: 'email-verification__container' }, { children: [error && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'email-verification__error-message' }, { children: error }))), showTransferMessage && (jsx("div", Object.assign({ className: 'email-verification__transfer-message' }, { children: "Verification complete, the email is now verified to this account." }))), isValidated ? (jsx("div", Object.assign({ className: 'email-verification__icon-container' }, { children: jsx(IconWithStatus, { containerClassName: 'email-verification__icon--verified', Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck }) }))) : (jsx(IconWithSpinner, { className: classNames({
216
206
  'email-verification__icon-with-spinner': Boolean(!error),
217
- }), Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) }))] })), !isLoginView && (jsx(TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", count] })), jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsx(SvgCheckCircle, {}), jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsx(TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsx(TextButton, Object.assign({ className: 'email-verification__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))), termsOfServiceUrl && privacyPolicyUrl && isLoginView && (jsx(TosAndPp, { mode: 'logging in', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })), jsx(PoweredByDynamic, {})] })));
207
+ }), Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'email-verification__title', color: 'primary' }, { children: "Confirm verification code" })), jsxs("div", Object.assign({ className: 'email-verification__copy-text-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) }))] })), !isLoginView && (jsx(TextButton, Object.assign({ onClick: () => setView('update-email'), className: 'email-verification__text-button', disabled: loading }, { children: "Edit email" }))), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: loading, handleComplete: isLoginView ? handleEmailLogin : handleComplete, isValidated: isValidated, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: () => setError(undefined) }), retried ? (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary' }, { children: ["Re-send code in ", remainingSeconds] })), jsxs("span", Object.assign({ className: 'email-verification__retry-container' }, { children: [jsx(SvgCheckCircle, {}), jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'primary', className: 'email-verification__retry-container-text' }, { children: "Code sent" }))] }))] })) : (!hideRetryButton && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_small', weight: 'medium', color: 'secondary' }, { children: "Did not receive your code yet?" })), jsx(TextButton, Object.assign({ className: 'email-verification__text-button', disabled: loading || isValidated, onClick: () => handleRetry() }, { children: "Re-send code" }))] }))), !isLoginView && (jsx(TextButton, Object.assign({ className: 'email-verification__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))), jsx(PoweredByDynamic, {})] })));
218
208
  };
219
209
 
220
210
  export { EmailVerification };
@@ -45,7 +45,7 @@ require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
45
45
  const EmailWalletOTPVerificationView = () => {
46
46
  const { setView } = ViewContext.useViewContext();
47
47
  const [error, setError] = React.useState();
48
- const { selectedWalletConnector: emailWalletConnector, termsOfServiceUrl, privacyPolicyUrl, clearStatesOnBackClick, } = useInternalDynamicContext.useInternalDynamicContext();
48
+ const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext.useInternalDynamicContext();
49
49
  if (!emailWalletConnector ||
50
50
  !walletConnectorCore.isEmailOTPWalletConnector(emailWalletConnector)) {
51
51
  throw new Error('Current wallet is not EmailWalletConnector');
@@ -62,7 +62,7 @@ const EmailWalletOTPVerificationView = () => {
62
62
  const { data: isValid, isLoading, mutate: onSubmit, } = useMutation.useMutation((otp) => emailWalletConnector.verifyOneTimePassword(otp), {
63
63
  onFailure: (error) => setError(error),
64
64
  });
65
- return (jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, termsOfServiceUrl: termsOfServiceUrl, privacyPolicyUrl: privacyPolicyUrl, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, displayPoweredByDynamic: true }));
65
+ return (jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, displayPoweredByDynamic: true }));
66
66
  };
67
67
 
68
68
  exports.EmailWalletOTPVerificationView = EmailWalletOTPVerificationView;
@@ -41,7 +41,7 @@ import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
41
41
  const EmailWalletOTPVerificationView = () => {
42
42
  const { setView } = useViewContext();
43
43
  const [error, setError] = useState();
44
- const { selectedWalletConnector: emailWalletConnector, termsOfServiceUrl, privacyPolicyUrl, clearStatesOnBackClick, } = useInternalDynamicContext();
44
+ const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext();
45
45
  if (!emailWalletConnector ||
46
46
  !isEmailOTPWalletConnector(emailWalletConnector)) {
47
47
  throw new Error('Current wallet is not EmailWalletConnector');
@@ -58,7 +58,7 @@ const EmailWalletOTPVerificationView = () => {
58
58
  const { data: isValid, isLoading, mutate: onSubmit, } = useMutation((otp) => emailWalletConnector.verifyOneTimePassword(otp), {
59
59
  onFailure: (error) => setError(error),
60
60
  });
61
- return (jsx(OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, termsOfServiceUrl: termsOfServiceUrl, privacyPolicyUrl: privacyPolicyUrl, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, displayPoweredByDynamic: true }));
61
+ return (jsx(OTPVerificationView, { email: email, error: error, onClickBack: handleBackClick, isLoading: isLoading, onPinComplete: onSubmit, isValid: isValid === true, onPinChange: () => setError(undefined), onClickEditEmail: handleBackClick, displayPoweredByDynamic: true }));
62
62
  };
63
63
 
64
64
  export { EmailWalletOTPVerificationView };
@@ -24,6 +24,7 @@ var useInternalDynamicContext = require('../../context/DynamicContext/useInterna
24
24
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
25
25
  var walletListBuilder = require('../../utils/functions/walletListBuilder/walletListBuilder.cjs');
26
26
  var SocialRedirectContext = require('../../context/SocialRedirectContext/SocialRedirectContext.cjs');
27
+ var useAuthLayoutChecks = require('../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs');
27
28
  var LoginWithEmailForm = require('./components/LoginWithEmailForm/LoginWithEmailForm.cjs');
28
29
  var LoginWithEmailWalletList = require('./components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs');
29
30
  var SocialSignIn = require('./components/SocialSignIn/SocialSignIn.cjs');
@@ -33,6 +34,7 @@ const LoginWithEmailView = () => {
33
34
  const { error } = ErrorContext.useErrorContext();
34
35
  const { authorizationViewDisplayOrder, wallets, projectSettings, walletsFilter, signWithEmailWalletName, loginWithEmail, } = useInternalDynamicContext.useInternalDynamicContext();
35
36
  const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
37
+ const { showToSFooter } = useAuthLayoutChecks.useAuthLayoutChecks();
36
38
  const { enabledSocialProviders } = SocialRedirectContext.useSocialRedirectContext();
37
39
  const { numberOfWallets, walletsList } = walletListBuilder.walletListBuilder({
38
40
  groupWallets: true,
@@ -52,6 +54,7 @@ const LoginWithEmailView = () => {
52
54
  : 'Or continue with';
53
55
  return (jsxRuntime.jsxs("div", Object.assign({ className: 'login-with-email__container' }, { children: [error && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: error }), jsxRuntime.jsxs("div", Object.assign({ className: classNames.classNames('login-with-email__scroll', {
54
56
  'login-with-email__scroll--email-first': isWeb2Priority,
57
+ 'login-with-email__scroll--with-footer': showToSFooter,
55
58
  }), "data-testid": 'login-with-email-scroll' }, { children: [numberOfWallets &&
56
59
  walletsList.length &&
57
60
  !((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _a === void 0 ? void 0 : _a.emailOnly) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(LoginWithEmailWalletList.LoginWithEmailWalletList, { walletsList: walletsList, numberOfWallets: numberOfWallets }), jsxRuntime.jsx(Divider.Divider, { text: dividerText })] })) : null, jsxRuntime.jsxs("div", Object.assign({ className: 'login-with-email__scroll__web2' }, { children: [jsxRuntime.jsx(LoginWithEmailForm.LoginWithEmailForm, {}), enabledSocialProviders.length > 0 && jsxRuntime.jsx(SocialSignIn.SocialSignIn, {})] }))] }))] })));
@@ -20,6 +20,7 @@ import { useInternalDynamicContext } from '../../context/DynamicContext/useInter
20
20
  import { classNames } from '../../utils/functions/classNames/classNames.js';
21
21
  import { walletListBuilder } from '../../utils/functions/walletListBuilder/walletListBuilder.js';
22
22
  import { useSocialRedirectContext } from '../../context/SocialRedirectContext/SocialRedirectContext.js';
23
+ import { useAuthLayoutChecks } from '../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
23
24
  import { LoginWithEmailForm } from './components/LoginWithEmailForm/LoginWithEmailForm.js';
24
25
  import { NUMBER_OF_WALLETS, LoginWithEmailWalletList } from './components/LoginWithEmailWalletList/LoginWithEmailWalletList.js';
25
26
  import { SocialSignIn } from './components/SocialSignIn/SocialSignIn.js';
@@ -29,6 +30,7 @@ const LoginWithEmailView = () => {
29
30
  const { error } = useErrorContext();
30
31
  const { authorizationViewDisplayOrder, wallets, projectSettings, walletsFilter, signWithEmailWalletName, loginWithEmail, } = useInternalDynamicContext();
31
32
  const { walletBook } = useWalletBookContext();
33
+ const { showToSFooter } = useAuthLayoutChecks();
32
34
  const { enabledSocialProviders } = useSocialRedirectContext();
33
35
  const { numberOfWallets, walletsList } = walletListBuilder({
34
36
  groupWallets: true,
@@ -48,6 +50,7 @@ const LoginWithEmailView = () => {
48
50
  : 'Or continue with';
49
51
  return (jsxs("div", Object.assign({ className: 'login-with-email__container' }, { children: [error && jsx(ErrorContainer, { children: error }), jsxs("div", Object.assign({ className: classNames('login-with-email__scroll', {
50
52
  'login-with-email__scroll--email-first': isWeb2Priority,
53
+ 'login-with-email__scroll--with-footer': showToSFooter,
51
54
  }), "data-testid": 'login-with-email-scroll' }, { children: [numberOfWallets &&
52
55
  walletsList.length &&
53
56
  !((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design.modal) === null || _a === void 0 ? void 0 : _a.emailOnly) ? (jsxs(Fragment, { children: [jsx(LoginWithEmailWalletList, { walletsList: walletsList, numberOfWallets: numberOfWallets }), jsx(Divider, { text: dividerText })] })) : null, jsxs("div", Object.assign({ className: 'login-with-email__scroll__web2' }, { children: [jsx(LoginWithEmailForm, {}), enabledSocialProviders.length > 0 && jsx(SocialSignIn, {})] }))] }))] })));
@@ -9,7 +9,7 @@ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
9
  var sdkApi = require('@dynamic-labs/sdk-api');
10
10
  require('@dynamic-labs/utils');
11
11
  var api = require('../../../../data/api.cjs');
12
- require('../../../../shared/logger.cjs');
12
+ var logger = require('../../../../shared/logger.cjs');
13
13
  require('@dynamic-labs/iconic');
14
14
  var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
15
15
  require('@dynamic-labs/wallet-book');
@@ -116,6 +116,7 @@ const LoginWithEmailForm = () => {
116
116
  yield submitHandler();
117
117
  }
118
118
  catch (error) {
119
+ logger.logger.debug(error);
119
120
  setErrorMessage(error.code);
120
121
  }
121
122
  finally {
@@ -5,7 +5,7 @@ import { isEmailWalletConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import { ProviderEnum } from '@dynamic-labs/sdk-api';
6
6
  import '@dynamic-labs/utils';
7
7
  import { getEmailProvider, createEmailVerification } from '../../../../data/api.js';
8
- import '../../../../shared/logger.js';
8
+ import { logger } from '../../../../shared/logger.js';
9
9
  import '@dynamic-labs/iconic';
10
10
  import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
11
11
  import '@dynamic-labs/wallet-book';
@@ -112,6 +112,7 @@ const LoginWithEmailForm = () => {
112
112
  yield submitHandler();
113
113
  }
114
114
  catch (error) {
115
+ logger.debug(error);
115
116
  setErrorMessage(error.code);
116
117
  }
117
118
  finally {
@@ -39,14 +39,13 @@ require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondar
39
39
  require('../../context/MockContext/MockContext.cjs');
40
40
  require('../../context/CaptchaContext/CaptchaContext.cjs');
41
41
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
42
- var TosAndPp = require('../../components/TosAndPp/TosAndPp.cjs');
43
42
  require('../../components/Popper/Popper/Popper.cjs');
44
43
  require('../../components/Popper/PopperContext/PopperContext.cjs');
45
44
  require('formik');
46
45
  require('yup');
47
46
 
48
47
  const PendingConnectView = () => {
49
- const { selectedWalletConnector: walletConnector, termsOfServiceUrl, privacyPolicyUrl, } = useInternalDynamicContext.useInternalDynamicContext();
48
+ const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
50
49
  const iconSize = 94;
51
50
  const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.name, style: {
52
51
  height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
@@ -54,7 +53,7 @@ const PendingConnectView = () => {
54
53
  } }));
55
54
  return (jsxRuntime.jsxs("div", Object.assign({ className: 'pending-connect__container' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'pending-connect__title' }, { children: "Connecting to your wallet" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text' }, { children: utils.isMobile()
56
55
  ? 'Click connect in your mobile wallet'
57
- : 'Click connect in your wallet popup' })), termsOfServiceUrl && privacyPolicyUrl && (jsxRuntime.jsx(TosAndPp.TosAndPp, { mode: 'connecting', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'pending-connect__powered-by' })] })));
56
+ : 'Click connect in your wallet popup' })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'pending-connect__powered-by' })] })));
58
57
  };
59
58
 
60
59
  exports.PendingConnectView = PendingConnectView;
@@ -35,14 +35,13 @@ import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/Secondary
35
35
  import '../../context/MockContext/MockContext.js';
36
36
  import '../../context/CaptchaContext/CaptchaContext.js';
37
37
  import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
38
- import { TosAndPp } from '../../components/TosAndPp/TosAndPp.js';
39
38
  import '../../components/Popper/Popper/Popper.js';
40
39
  import '../../components/Popper/PopperContext/PopperContext.js';
41
40
  import 'formik';
42
41
  import 'yup';
43
42
 
44
43
  const PendingConnectView = () => {
45
- const { selectedWalletConnector: walletConnector, termsOfServiceUrl, privacyPolicyUrl, } = useInternalDynamicContext();
44
+ const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
46
45
  const iconSize = 94;
47
46
  const icon = (jsx(WalletIcon, { walletName: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.name, style: {
48
47
  height: pixelToRem(iconSize * iconRatio),
@@ -50,7 +49,7 @@ const PendingConnectView = () => {
50
49
  } }));
51
50
  return (jsxs("div", Object.assign({ className: 'pending-connect__container' }, { children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', className: 'pending-connect__title' }, { children: "Connecting to your wallet" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text' }, { children: isMobile()
52
51
  ? 'Click connect in your mobile wallet'
53
- : 'Click connect in your wallet popup' })), termsOfServiceUrl && privacyPolicyUrl && (jsx(TosAndPp, { mode: 'connecting', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })), jsx(PoweredByDynamic, { classNameRoot: 'pending-connect__powered-by' })] })));
52
+ : 'Click connect in your wallet popup' })), jsx(PoweredByDynamic, { classNameRoot: 'pending-connect__powered-by' })] })));
54
53
  };
55
54
 
56
55
  export { PendingConnectView };
@@ -44,7 +44,6 @@ require('../../context/MockContext/MockContext.cjs');
44
44
  require('../../context/CaptchaContext/CaptchaContext.cjs');
45
45
  var useConnectAndSignSplitSteps = require('../../utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs');
46
46
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
47
- var TosAndPp = require('../../components/TosAndPp/TosAndPp.cjs');
48
47
  require('../../components/Popper/Popper/Popper.cjs');
49
48
  require('../../components/Popper/PopperContext/PopperContext.cjs');
50
49
  require('formik');
@@ -52,7 +51,7 @@ require('yup');
52
51
 
53
52
  const PendingSignatureView = () => {
54
53
  const [loading, setLoading] = React.useState(false);
55
- const { user, selectedWalletConnector: walletConnector, privacyPolicyUrl, termsOfServiceUrl, } = useInternalDynamicContext.useInternalDynamicContext();
54
+ const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
56
55
  const { signAlreadyConnectedUser } = useConnectAndSignSplitSteps.useConnectAndSignSplitSteps();
57
56
  const iconSize = 100;
58
57
  /**
@@ -81,7 +80,7 @@ const PendingSignatureView = () => {
81
80
  const typographyBodyCopy = isPhantomLedger
82
81
  ? "We need your signature to confirm you own this wallet (this doesn't cost gas). Click sign in your wallet to log in."
83
82
  : 'We need your signature to confirm you own this wallet. Click sign in your wallet to log in.';
84
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'pending-signature__container', "data-testid": 'pending-signature-view' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames.classNames('pending-signature__title') }, { children: "Requesting signature" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy') }, { children: typographyBodyCopy })), isPhantomLedger && (jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'regular', className: classNames.classNames('pending-signature__copy', 'pending-signature__copy--mini') }, { children: [jsxRuntime.jsx("strong", { children: "Note:" }), " Ledger with Phantom doesn\u2019t support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more."] }))), !user && (jsxRuntime.jsx(TosAndPp.TosAndPp, { mode: 'signing', privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })), requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector) && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonRounded: 'medium', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
83
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'pending-signature__container', "data-testid": 'pending-signature-view' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', className: classNames.classNames('pending-signature__title') }, { children: "Requesting signature" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy') }, { children: typographyBodyCopy })), isPhantomLedger && (jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', weight: 'regular', className: classNames.classNames('pending-signature__copy', 'pending-signature__copy--mini') }, { children: [jsxRuntime.jsx("strong", { children: "Note:" }), " Ledger with Phantom doesn\u2019t support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more."] }))), requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector) && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonRounded: 'medium', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
85
84
  variant: 'button_primary',
86
85
  weight: 'medium',
87
86
  } }, { children: "Click to Sign" }))), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'pending-signature__powered-by' })] })));