@dynamic-labs/sdk-react-core 4.4.2 → 4.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -11
  5. package/src/lib/Main.cjs +3 -3
  6. package/src/lib/Main.js +3 -3
  7. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -3
  8. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -3
  9. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +2 -2
  10. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +2 -2
  11. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +2 -2
  12. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +2 -2
  13. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
  14. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
  15. package/src/lib/components/TransactionConfirmationPageLayout/utils.cjs +2 -2
  16. package/src/lib/components/TransactionConfirmationPageLayout/utils.d.ts +1 -1
  17. package/src/lib/components/TransactionConfirmationPageLayout/utils.js +2 -2
  18. package/src/lib/context/CaptchaContext/CaptchaContext.cjs +3 -3
  19. package/src/lib/context/CaptchaContext/CaptchaContext.js +3 -3
  20. package/src/lib/context/MockContext/MockContext.cjs +0 -2
  21. package/src/lib/context/MockContext/MockContext.js +0 -2
  22. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +5 -5
  23. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +5 -5
  24. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +8 -9
  25. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +8 -9
  26. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +8 -3
  27. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +8 -3
  28. package/src/lib/context/ViewContext/ViewContext.cjs +0 -2
  29. package/src/lib/context/ViewContext/ViewContext.d.ts +0 -10
  30. package/src/lib/context/ViewContext/ViewContext.js +0 -2
  31. package/src/lib/context/WalletGroupContext/WalletGroupContext.cjs +3 -3
  32. package/src/lib/context/WalletGroupContext/WalletGroupContext.js +3 -3
  33. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -4
  34. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -4
  35. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +4 -0
  36. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +4 -0
  37. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +3 -3
  38. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.d.ts +1 -1
  39. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +3 -3
  40. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +8 -8
  41. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +8 -8
  42. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +7 -7
  43. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +7 -7
  44. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +2 -2
  45. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +2 -2
  46. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +3 -3
  47. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +3 -3
  48. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -3
  49. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -3
  50. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +3 -3
  51. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +3 -3
  52. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +3 -3
  53. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +3 -3
  54. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +2 -2
  55. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +2 -2
  56. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +4 -4
  57. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +4 -4
  58. package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.cjs +3 -3
  59. package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.js +3 -3
  60. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +6 -6
  61. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +6 -6
  62. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +2 -2
  63. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +2 -2
  64. package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +11 -11
  65. package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +11 -11
  66. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +5 -7
  67. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +5 -7
  68. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +38 -24
  69. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +3 -2
  70. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +38 -24
  71. package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.cjs +3 -3
  72. package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.js +3 -3
  73. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +5 -5
  74. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +5 -5
  75. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +5 -5
  76. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +5 -5
  77. package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +9 -9
  78. package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +9 -9
  79. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +6 -6
  80. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +6 -6
  81. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +12 -12
  82. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +12 -12
  83. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +7 -7
  84. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +7 -7
  85. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +4 -4
  86. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +4 -4
  87. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +3 -3
  88. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +3 -3
  89. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +2 -2
  90. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +2 -2
  91. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
  92. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
  93. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +2 -2
  94. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +2 -2
  95. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +3 -3
  96. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +3 -3
  97. package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
  98. package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
  99. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
  100. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
  101. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +4 -4
  102. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +4 -4
  103. package/src/lib/views/LoginView/LoginView.cjs +2 -2
  104. package/src/lib/views/LoginView/LoginView.js +2 -2
  105. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +4 -4
  106. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +4 -4
  107. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +3 -3
  108. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +3 -3
  109. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +5 -5
  110. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +5 -5
  111. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
  112. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
  113. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +4 -4
  114. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +4 -4
  115. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +5 -5
  116. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +5 -5
  117. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +5 -5
  118. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +5 -5
  119. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +5 -5
  120. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +5 -5
  121. package/src/lib/views/NoAccess/NoAccess.cjs +2 -2
  122. package/src/lib/views/NoAccess/NoAccess.js +2 -2
  123. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +2 -4
  124. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +2 -4
  125. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +2 -2
  126. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +2 -2
  127. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -2
  128. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -2
  129. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -2
  130. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -2
  131. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
  132. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
  133. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -2
  134. package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -2
  135. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +3 -3
  136. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
  137. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -4
  138. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -4
  139. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -3
  140. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -3
  141. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +4 -4
  142. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +4 -4
  143. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +2 -2
  144. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +2 -2
  145. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
  146. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
@@ -96,13 +96,13 @@ import '../../components/Popper/PopperContext/PopperContext.js';
96
96
 
97
97
  const CoinbaseMPCClaimIntro = () => {
98
98
  const { setShowAuthFlow } = useInternalDynamicContext();
99
- const { setView } = useViewContext();
99
+ const { pushView } = useViewContext();
100
100
  const { t } = useTranslation();
101
101
  const closeButton = (jsx(IconButton, { onClick: () => setShowAuthFlow(false), type: 'button', children: jsx(SvgClose, {}) }));
102
102
  return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_create_password.intro.title', children: t('dyn_create_password.intro.title') }) }), jsx("div", { className: 'mpc-claim-intro', children: jsxs("div", { className: 'mpc-claim-intro__body', children: [jsx("div", { className: 'mpc-claim-intro__body__description', children: jsx(SvgWalletClaimHero, {}) }), jsx("div", { className: 'confirm-password-description', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_create_password.intro.description', children: t('dyn_create_password.intro.description.title') }) }), jsxs("div", { className: 'mpc-claim-intro__body__card', children: [jsxs("div", { className: 'mpc-claim-intro__body__card__statement', children: [jsx("div", { className: 'mpc-claim-intro__body__card__icon', children: jsx(SvgLock, {}) }), jsxs("div", { children: [jsx(Typography, { variant: 'body_normal', color: 'primary', style: { letterSpacing: '-0.15px' }, copykey: 'dyn_create_password.intro.description.additional_protection.title', children: t('dyn_create_password.intro.description.additional_protection.title') }), jsx(Typography, { variant: 'body_small', color: 'secondary', weight: 'regular', copykey: 'dyn_create_password.intro.description.additional_protection.description', children: t('dyn_create_password.intro.description.additional_protection.description') })] })] }), jsxs("div", { className: 'mpc-claim-intro__body__card__statement', children: [jsx("div", { className: 'mpc-claim-intro__body__card__icon', children: jsx(SvgAltKey, {}) }), jsxs("div", { children: [jsx(Typography, { variant: 'body_normal', color: 'primary', style: { letterSpacing: '-0.15px' }, copykey: 'dyn_create_password.intro.description.restore_access.title', children: t('dyn_create_password.intro.description.restore_access.title') }), jsx(Typography, { variant: 'body_small', color: 'secondary', weight: 'regular', copykey: 'dyn_create_password.intro.description.restore_access.description', children: t('dyn_create_password.intro.description.restore_access.description') })] })] })] }), jsx(TypographyButton, { buttonPadding: 'large', buttonVariant: 'brand-primary', typographyProps: {
103
103
  color: 'inherit',
104
104
  }, onClick: () => {
105
- setView('create-password-view', {
105
+ pushView('create-password-view', {
106
106
  notCalledFromWalletUtils: true,
107
107
  });
108
108
  }, copykey: 'dyn_create_password.intro.continue', children: t('dyn_create_password.intro.continue') })] }) })] }));
@@ -97,7 +97,7 @@ require('../../components/Popper/Popper/Popper.cjs');
97
97
  require('../../components/Popper/PopperContext/PopperContext.cjs');
98
98
 
99
99
  const EmailConfirmationWaitingView = () => {
100
- const { setView } = ViewContext.useViewContext();
100
+ const { pushView } = ViewContext.useViewContext();
101
101
  const { clearStatesOnBackClick, selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
102
102
  const { t } = reactI18next.useTranslation();
103
103
  if (walletConnector && !walletConnectorCore.isEmailWalletConnector(walletConnector)) {
@@ -106,9 +106,9 @@ const EmailConfirmationWaitingView = () => {
106
106
  const emailConnector = walletConnector;
107
107
  const onClickResetEmail = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
108
108
  yield (emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.endSession());
109
- setView('login-with-email-or-wallet');
109
+ pushView('login-with-email-or-wallet');
110
110
  clearStatesOnBackClick();
111
- }), [setView, emailConnector, clearStatesOnBackClick]);
111
+ }), [pushView, emailConnector, clearStatesOnBackClick]);
112
112
  return (jsxRuntime.jsxs("div", { className: 'email-confirmation-waiting-view', children: [jsxRuntime.jsx("div", { className: 'email-confirmation-waiting-view__header-icon', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title', copykey: 'dyn_email_confirmation.title', children: t('dyn_email_confirmation.title') }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'body_normal', color: 'secondary', copykey: 'dyn_email_confirmation.description', children: t('dyn_email_confirmation.description') }), jsxRuntime.jsxs("div", { className: 'email-confirmation-waiting-view__email-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span', children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email }), jsxRuntime.jsx(IconButton.IconButton, { onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-tertiary', children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) }) })] }), jsxRuntime.jsx("div", { className: 'email-confirmation-waiting-view__note', children: jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'body_small', color: 'secondary', copykey: 'dyn_email_confirmation.note', children: t('dyn_email_confirmation.note') }) }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'email-confirmation-waiting-view__powered_by_dynamic_footer' })] }));
113
113
  };
114
114
 
@@ -93,7 +93,7 @@ import '../../components/Popper/Popper/Popper.js';
93
93
  import '../../components/Popper/PopperContext/PopperContext.js';
94
94
 
95
95
  const EmailConfirmationWaitingView = () => {
96
- const { setView } = useViewContext();
96
+ const { pushView } = useViewContext();
97
97
  const { clearStatesOnBackClick, selectedWalletConnector: walletConnector } = useInternalDynamicContext();
98
98
  const { t } = useTranslation();
99
99
  if (walletConnector && !isEmailWalletConnector(walletConnector)) {
@@ -102,9 +102,9 @@ const EmailConfirmationWaitingView = () => {
102
102
  const emailConnector = walletConnector;
103
103
  const onClickResetEmail = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
104
104
  yield (emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.endSession());
105
- setView('login-with-email-or-wallet');
105
+ pushView('login-with-email-or-wallet');
106
106
  clearStatesOnBackClick();
107
- }), [setView, emailConnector, clearStatesOnBackClick]);
107
+ }), [pushView, emailConnector, clearStatesOnBackClick]);
108
108
  return (jsxs("div", { className: 'email-confirmation-waiting-view', children: [jsx("div", { className: 'email-confirmation-waiting-view__header-icon', children: jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }) }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'email-confirmation-waiting-view__title', copykey: 'dyn_email_confirmation.title', children: t('dyn_email_confirmation.title') }), jsx(Typography, { weight: 'regular', variant: 'body_normal', color: 'secondary', copykey: 'dyn_email_confirmation.description', children: t('dyn_email_confirmation.description') }), jsxs("div", { className: 'email-confirmation-waiting-view__email-container', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span', children: emailConnector === null || emailConnector === void 0 ? void 0 : emailConnector.email }), jsx(IconButton, { onClick: onClickResetEmail, className: 'email-confirmation-waiting-view__edit-icon-button', "data-testid": 'email-confirmation-waiting-view__edit-button', children: jsx(Icon, { color: 'text-tertiary', children: jsx(SvgPencilAltIcon, {}) }) })] }), jsx("div", { className: 'email-confirmation-waiting-view__note', children: jsx(Typography, { weight: 'regular', variant: 'body_small', color: 'secondary', copykey: 'dyn_email_confirmation.note', children: t('dyn_email_confirmation.note') }) }), jsx(PoweredByDynamic, { classNameRoot: 'email-confirmation-waiting-view__powered_by_dynamic_footer' })] }));
109
109
  };
110
110
 
@@ -122,7 +122,7 @@ const SECONDS_TO_RETRY = 15;
122
122
  const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
123
123
  var _a, _b, _c, _d;
124
124
  const { environmentId, handleLogOut, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions, primaryWallet, } = useInternalDynamicContext.useInternalDynamicContext();
125
- const { setView, goToInitialView } = ViewContext.useViewContext();
125
+ const { pushView, clearStackAndPushInitialView } = ViewContext.useViewContext();
126
126
  const { error, setError, setErrorMessage } = ErrorContext.useErrorContext();
127
127
  const { loading, setLoading } = LoadingContext.useLoadingContext();
128
128
  const [showRetryButton, setShowRetryButton] = React.useState(_showRetryButton);
@@ -167,7 +167,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
167
167
  setShowTransferMessage === null || setShowTransferMessage === void 0 ? void 0 : setShowTransferMessage(true);
168
168
  }
169
169
  if (isEmailRecoveryFlow) {
170
- setView('passkey-recovery-add-email', {
170
+ pushView('passkey-recovery-add-email', {
171
171
  canSkipAddingEmail: false,
172
172
  isFromEmailVerification: true,
173
173
  });
@@ -234,7 +234,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
234
234
  hasTurnkeyVerifiedCredentialAuthenticator,
235
235
  hasRecoveryEmail,
236
236
  isTurnkeyProviderEnabled,
237
- setView,
237
+ pushView,
238
238
  addRecoveryEmail,
239
239
  setShowAuthFlow,
240
240
  (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.embeddedWallets) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation,
@@ -332,7 +332,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
332
332
  setShowRetryButton(false);
333
333
  }
334
334
  if (error.code === 'invalid_email_verification') {
335
- goToInitialView();
335
+ clearStackAndPushInitialView();
336
336
  }
337
337
  }
338
338
  finally {
@@ -118,7 +118,7 @@ const SECONDS_TO_RETRY = 15;
118
118
  const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _showRetryButton = true, showTransferMessage: _showTransferMessage = false, }) => {
119
119
  var _a, _b, _c, _d;
120
120
  const { environmentId, handleLogOut, setShowAuthFlow, projectSettings, user, userWithMissingInfo, walletConnectorOptions, primaryWallet, } = useInternalDynamicContext();
121
- const { setView, goToInitialView } = useViewContext();
121
+ const { pushView, clearStackAndPushInitialView } = useViewContext();
122
122
  const { error, setError, setErrorMessage } = useErrorContext();
123
123
  const { loading, setLoading } = useLoadingContext();
124
124
  const [showRetryButton, setShowRetryButton] = useState(_showRetryButton);
@@ -163,7 +163,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
163
163
  setShowTransferMessage === null || setShowTransferMessage === void 0 ? void 0 : setShowTransferMessage(true);
164
164
  }
165
165
  if (isEmailRecoveryFlow) {
166
- setView('passkey-recovery-add-email', {
166
+ pushView('passkey-recovery-add-email', {
167
167
  canSkipAddingEmail: false,
168
168
  isFromEmailVerification: true,
169
169
  });
@@ -230,7 +230,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
230
230
  hasTurnkeyVerifiedCredentialAuthenticator,
231
231
  hasRecoveryEmail,
232
232
  isTurnkeyProviderEnabled,
233
- setView,
233
+ pushView,
234
234
  addRecoveryEmail,
235
235
  setShowAuthFlow,
236
236
  (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.embeddedWallets) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation,
@@ -328,7 +328,7 @@ const EmailVerification = ({ isEmailRecoveryFlow = false, showRetryButton: _show
328
328
  setShowRetryButton(false);
329
329
  }
330
330
  if (error.code === 'invalid_email_verification') {
331
- goToInitialView();
331
+ clearStackAndPushInitialView();
332
332
  }
333
333
  }
334
334
  finally {
@@ -96,7 +96,7 @@ require('../../components/Popper/Popper/Popper.cjs');
96
96
  require('../../components/Popper/PopperContext/PopperContext.cjs');
97
97
 
98
98
  const EmailWalletOTPVerificationView = () => {
99
- const { setView } = ViewContext.useViewContext();
99
+ const { pushView } = ViewContext.useViewContext();
100
100
  const [error, setError] = React.useState();
101
101
  const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext.useInternalDynamicContext();
102
102
  if (!emailWalletConnector ||
@@ -110,7 +110,7 @@ const EmailWalletOTPVerificationView = () => {
110
110
  const handleBackClick = () => {
111
111
  emailWalletConnector.clearEmail();
112
112
  clearStatesOnBackClick();
113
- setView('login-with-email-or-wallet');
113
+ pushView('login-with-email-or-wallet');
114
114
  dynamicEvents.dynamicEvents.emit('authFailure', {
115
115
  email,
116
116
  option: email,
@@ -92,7 +92,7 @@ import '../../components/Popper/Popper/Popper.js';
92
92
  import '../../components/Popper/PopperContext/PopperContext.js';
93
93
 
94
94
  const EmailWalletOTPVerificationView = () => {
95
- const { setView } = useViewContext();
95
+ const { pushView } = useViewContext();
96
96
  const [error, setError] = useState();
97
97
  const { selectedWalletConnector: emailWalletConnector, clearStatesOnBackClick, } = useInternalDynamicContext();
98
98
  if (!emailWalletConnector ||
@@ -106,7 +106,7 @@ const EmailWalletOTPVerificationView = () => {
106
106
  const handleBackClick = () => {
107
107
  emailWalletConnector.clearEmail();
108
108
  clearStatesOnBackClick();
109
- setView('login-with-email-or-wallet');
109
+ pushView('login-with-email-or-wallet');
110
110
  dynamicEvents.emit('authFailure', {
111
111
  email,
112
112
  option: email,
@@ -118,7 +118,7 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
118
118
  const { isTurnkeyWallet } = useIsTurnkeyWallet.useIsTurnkeyWallet();
119
119
  const { shadowRoot } = ShadowDOM.useShadowDOMContext();
120
120
  const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
121
- const { setView } = ViewContext.useViewContext();
121
+ const { pushView } = ViewContext.useViewContext();
122
122
  const { getEOAWallet, isSmartWallet } = useSmartWallets.useSmartWallets();
123
123
  const [acknowledgement1, setAcknowledgement1] = React.useState(false);
124
124
  const [hasRevealedCoinbaseMpcKey, setHasRevealedCoinbaseMpcKey] = React.useState(false);
@@ -216,11 +216,11 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
216
216
  }
217
217
  catch (e) {
218
218
  if (e instanceof utils.AccessBlockedError) {
219
- setView('access-blocked');
219
+ pushView('access-blocked');
220
220
  }
221
221
  return;
222
222
  }
223
- }, [error, setView]);
223
+ }, [error, pushView]);
224
224
  const { t } = reactI18next.useTranslation();
225
225
  const contentHeader = (jsxRuntime.jsxs("div", { children: [primaryWallet &&
226
226
  isSmartWallet(primaryWallet) &&
@@ -261,7 +261,7 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
261
261
  borderRadius: '0.75rem',
262
262
  }, allow: 'clipboard-write' }));
263
263
  const handleClickUnlink = () => {
264
- setView('embedded-delete-view');
264
+ pushView('embedded-delete-view');
265
265
  };
266
266
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: isPromptForExport ? null : closeButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: title }) }), jsxRuntime.jsx("div", { className: 'embedded-reveal-view', children: jsxRuntime.jsxs("div", { className: 'embedded-reveal-view__body', children: [contentHeader, isCoinbaseMpcWallet && coinbaseWaasKeyExportIframe, isTurnkeyWallet ? (jsxRuntime.jsx("div", { id: constants.iframeContainerId, style: { display: data ? 'block' : 'none' }, ref: iframeContainerRef })) : null, hasInjectedCredential ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonPadding: 'large', buttonVariant: 'brand-primary', onClick: () => setShowAuthFlow(false), loading: isLoading, copykey: 'dyn_embedded_reveal.done_button_label', typographyProps: {
267
267
  color: 'inherit',
@@ -114,7 +114,7 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
114
114
  const { isTurnkeyWallet } = useIsTurnkeyWallet();
115
115
  const { shadowRoot } = useShadowDOMContext();
116
116
  const { setDynamicWidgetView } = useWidgetContext();
117
- const { setView } = useViewContext();
117
+ const { pushView } = useViewContext();
118
118
  const { getEOAWallet, isSmartWallet } = useSmartWallets();
119
119
  const [acknowledgement1, setAcknowledgement1] = useState(false);
120
120
  const [hasRevealedCoinbaseMpcKey, setHasRevealedCoinbaseMpcKey] = useState(false);
@@ -212,11 +212,11 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
212
212
  }
213
213
  catch (e) {
214
214
  if (e instanceof AccessBlockedError) {
215
- setView('access-blocked');
215
+ pushView('access-blocked');
216
216
  }
217
217
  return;
218
218
  }
219
- }, [error, setView]);
219
+ }, [error, pushView]);
220
220
  const { t } = useTranslation();
221
221
  const contentHeader = (jsxs("div", { children: [primaryWallet &&
222
222
  isSmartWallet(primaryWallet) &&
@@ -257,7 +257,7 @@ const EmbeddedRevealView = ({ exportPrivateKey, isPromptForExport = false, }) =>
257
257
  borderRadius: '0.75rem',
258
258
  }, allow: 'clipboard-write' }));
259
259
  const handleClickUnlink = () => {
260
- setView('embedded-delete-view');
260
+ pushView('embedded-delete-view');
261
261
  };
262
262
  return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: isPromptForExport ? null : closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: title }) }), jsx("div", { className: 'embedded-reveal-view', children: jsxs("div", { className: 'embedded-reveal-view__body', children: [contentHeader, isCoinbaseMpcWallet && coinbaseWaasKeyExportIframe, isTurnkeyWallet ? (jsx("div", { id: iframeContainerId, style: { display: data ? 'block' : 'none' }, ref: iframeContainerRef })) : null, hasInjectedCredential ? (jsxs(Fragment, { children: [jsx(TypographyButton, { buttonPadding: 'large', buttonVariant: 'brand-primary', onClick: () => setShowAuthFlow(false), loading: isLoading, copykey: 'dyn_embedded_reveal.done_button_label', typographyProps: {
263
263
  color: 'inherit',
@@ -24,13 +24,13 @@ var showFarcasterQrCodeView = require('./utils/showFarcasterQrCodeView/showFarca
24
24
  const LoginView = () => {
25
25
  var _a;
26
26
  const { error } = ErrorContext.useErrorContext();
27
- const { setView } = ViewContext.useViewContext();
27
+ const { pushView } = ViewContext.useViewContext();
28
28
  const { isWalletOnly, loginViewSections } = useLoginView.useLoginView();
29
29
  const { enabledSocialProviders } = SocialRedirectContext.useSocialRedirectContext();
30
30
  const { showDefaultFooter } = useAuthLayoutChecks.useAuthLayoutChecks();
31
31
  const { handleWalletItemClick } = useWalletItemActions.useWalletItemActions();
32
32
  const numOfWallets = ((_a = loginViewSections.find((section) => section.type === sdkApiCore.SdkViewSectionType.Wallet)) === null || _a === void 0 ? void 0 : _a.numOfItemsToDisplay) || 0;
33
- const renderViewSections = React.useMemo(() => loginViewSections.map((viewSection, index) => (jsxRuntime.jsx("div", { className: classNames.classNames('login-view__scroll__section', `login-view__scroll__section--${viewSection.type}`), children: jsxRuntime.jsx(LoginViewSection.LoginViewSection, { gotToWalletList: () => setView('login-with-email-or-wallet-full-wallet-list'), index: index, viewSection: viewSection, walletCount: numOfWallets }) }, `${viewSection.type}__${index}`))), [loginViewSections, numOfWallets]);
33
+ const renderViewSections = React.useMemo(() => loginViewSections.map((viewSection, index) => (jsxRuntime.jsx("div", { className: classNames.classNames('login-view__scroll__section', `login-view__scroll__section--${viewSection.type}`), children: jsxRuntime.jsx(LoginViewSection.LoginViewSection, { gotToWalletList: () => pushView('login-with-email-or-wallet-full-wallet-list'), index: index, viewSection: viewSection, walletCount: numOfWallets }) }, `${viewSection.type}__${index}`))), [loginViewSections, numOfWallets]);
34
34
  const errorElement = error && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { className: 'login-view__error-container', withIcon: false, children: error }));
35
35
  if (showFarcasterQrCodeView.showFarcasterQrCodeView(loginViewSections, enabledSocialProviders)) {
36
36
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [errorElement, jsxRuntime.jsx(FarcasterQrCodeView.FarcasterQrCodeView, {})] }));
@@ -20,13 +20,13 @@ import { showFarcasterQrCodeView } from './utils/showFarcasterQrCodeView/showFar
20
20
  const LoginView = () => {
21
21
  var _a;
22
22
  const { error } = useErrorContext();
23
- const { setView } = useViewContext();
23
+ const { pushView } = useViewContext();
24
24
  const { isWalletOnly, loginViewSections } = useLoginView();
25
25
  const { enabledSocialProviders } = useSocialRedirectContext();
26
26
  const { showDefaultFooter } = useAuthLayoutChecks();
27
27
  const { handleWalletItemClick } = useWalletItemActions();
28
28
  const numOfWallets = ((_a = loginViewSections.find((section) => section.type === SdkViewSectionType.Wallet)) === null || _a === void 0 ? void 0 : _a.numOfItemsToDisplay) || 0;
29
- const renderViewSections = useMemo(() => loginViewSections.map((viewSection, index) => (jsx("div", { className: classNames('login-view__scroll__section', `login-view__scroll__section--${viewSection.type}`), children: jsx(LoginViewSection, { gotToWalletList: () => setView('login-with-email-or-wallet-full-wallet-list'), index: index, viewSection: viewSection, walletCount: numOfWallets }) }, `${viewSection.type}__${index}`))), [loginViewSections, numOfWallets]);
29
+ const renderViewSections = useMemo(() => loginViewSections.map((viewSection, index) => (jsx("div", { className: classNames('login-view__scroll__section', `login-view__scroll__section--${viewSection.type}`), children: jsx(LoginViewSection, { gotToWalletList: () => pushView('login-with-email-or-wallet-full-wallet-list'), index: index, viewSection: viewSection, walletCount: numOfWallets }) }, `${viewSection.type}__${index}`))), [loginViewSections, numOfWallets]);
30
30
  const errorElement = error && (jsx(ErrorContainer, { className: 'login-view__error-container', withIcon: false, children: error }));
31
31
  if (showFarcasterQrCodeView(loginViewSections, enabledSocialProviders)) {
32
32
  return (jsxs(Fragment, { children: [errorElement, jsx(FarcasterQrCodeView, {})] }));
@@ -97,7 +97,7 @@ var EmailForm = require('../../../../components/EmailForm/EmailForm.cjs');
97
97
  const LoginEmailForm = ({ isLoading, onSubmit, onSubmitError, currentEmail, className, style, }) => {
98
98
  var _a;
99
99
  const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
100
- const { view, setView } = ViewContext.useViewContext();
100
+ const { view, pushView } = ViewContext.useViewContext();
101
101
  const { setVerificationUUID, setDisplayedDestination } = VerificationContext.useVerification();
102
102
  const { setErrorMessage } = ErrorContext.useErrorContext();
103
103
  const [invalidEmail, setInvalidEmail] = React.useState(false);
@@ -120,18 +120,18 @@ const LoginEmailForm = ({ isLoading, onSubmit, onSubmitError, currentEmail, clas
120
120
  // Pass verification info to [EmailVerification]
121
121
  setVerificationUUID(undefined);
122
122
  setDisplayedDestination(emailInput);
123
- setView('login-with-email-verification');
123
+ pushView('login-with-email-verification');
124
124
  });
125
125
  }
126
126
  catch (error) {
127
127
  handleEmailSubmitError(error);
128
- setView(view.type);
128
+ pushView(view.type);
129
129
  }
130
130
  }), [
131
131
  connectWithEmail,
132
132
  onSubmit,
133
133
  handleEmailSubmitError,
134
- setView,
134
+ pushView,
135
135
  view,
136
136
  setVerificationUUID,
137
137
  setDisplayedDestination,
@@ -93,7 +93,7 @@ import { EmailForm } from '../../../../components/EmailForm/EmailForm.js';
93
93
  const LoginEmailForm = ({ isLoading, onSubmit, onSubmitError, currentEmail, className, style, }) => {
94
94
  var _a;
95
95
  const { projectSettings } = useInternalDynamicContext();
96
- const { view, setView } = useViewContext();
96
+ const { view, pushView } = useViewContext();
97
97
  const { setVerificationUUID, setDisplayedDestination } = useVerification();
98
98
  const { setErrorMessage } = useErrorContext();
99
99
  const [invalidEmail, setInvalidEmail] = useState(false);
@@ -116,18 +116,18 @@ const LoginEmailForm = ({ isLoading, onSubmit, onSubmitError, currentEmail, clas
116
116
  // Pass verification info to [EmailVerification]
117
117
  setVerificationUUID(undefined);
118
118
  setDisplayedDestination(emailInput);
119
- setView('login-with-email-verification');
119
+ pushView('login-with-email-verification');
120
120
  });
121
121
  }
122
122
  catch (error) {
123
123
  handleEmailSubmitError(error);
124
- setView(view.type);
124
+ pushView(view.type);
125
125
  }
126
126
  }), [
127
127
  connectWithEmail,
128
128
  onSubmit,
129
129
  handleEmailSubmitError,
130
- setView,
130
+ pushView,
131
131
  view,
132
132
  setVerificationUUID,
133
133
  setDisplayedDestination,
@@ -96,7 +96,7 @@ var useInternalDynamicContext = require('../../../../../context/DynamicContext/u
96
96
 
97
97
  const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInvalidNumberMessage, }) => {
98
98
  const { engageCaptcha } = CaptchaContext.useCaptchaContext();
99
- const { view, setView } = ViewContext.useViewContext();
99
+ const { view, pushView } = ViewContext.useViewContext();
100
100
  const { environmentId, projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
101
101
  const { setDisplayedDestination, setVerificationUUID, setRetryData } = VerificationContext.useVerification();
102
102
  const { fieldsConfig } = useFields.useFields();
@@ -123,7 +123,7 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
123
123
  });
124
124
  // we can safely assume phone number always requires verification here
125
125
  // because this hook is only used for SMS sign in.
126
- setView('login-with-sms-verification');
126
+ pushView('login-with-sms-verification');
127
127
  setDisplayedDestination(formatPhone.formatPhone(phone));
128
128
  setVerificationUUID(verificationUUID);
129
129
  const phoneData = {
@@ -139,7 +139,7 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
139
139
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
140
140
  }
141
141
  catch (error) {
142
- setView(view.type);
142
+ pushView(view.type);
143
143
  if (error instanceof utils.SmsVerificationError) {
144
144
  let message = t('dyn_login.helper.phone_number_form.invalid_phone');
145
145
  if (error.code === 'too_many_sms_verification_attempts') {
@@ -92,7 +92,7 @@ import { useInternalDynamicContext } from '../../../../../context/DynamicContext
92
92
 
93
93
  const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInvalidNumberMessage, }) => {
94
94
  const { engageCaptcha } = useCaptchaContext();
95
- const { view, setView } = useViewContext();
95
+ const { view, pushView } = useViewContext();
96
96
  const { environmentId, projectSettings } = useInternalDynamicContext();
97
97
  const { setDisplayedDestination, setVerificationUUID, setRetryData } = useVerification();
98
98
  const { fieldsConfig } = useFields();
@@ -119,7 +119,7 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
119
119
  });
120
120
  // we can safely assume phone number always requires verification here
121
121
  // because this hook is only used for SMS sign in.
122
- setView('login-with-sms-verification');
122
+ pushView('login-with-sms-verification');
123
123
  setDisplayedDestination(formatPhone(phone));
124
124
  setVerificationUUID(verificationUUID);
125
125
  const phoneData = {
@@ -135,7 +135,7 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
135
135
  onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit();
136
136
  }
137
137
  catch (error) {
138
- setView(view.type);
138
+ pushView(view.type);
139
139
  if (error instanceof SmsVerificationError) {
140
140
  let message = t('dyn_login.helper.phone_number_form.invalid_phone');
141
141
  if (error.code === 'too_many_sms_verification_attempts') {
@@ -97,13 +97,13 @@ var SocialSignIn = require('../../../../../components/SocialSignIn/SocialSignIn.
97
97
  const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLayout, }) => {
98
98
  const { setShowAuthFlow, projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
99
99
  const { setSocialProvider, socialProvider, enabledSocialProviders } = SocialRedirectContext.useSocialRedirectContext();
100
- const { setView, goToInitialView } = ViewContext.useViewContext();
100
+ const { pushView, clearStackAndPushInitialView } = ViewContext.useViewContext();
101
101
  const { engageCaptcha } = CaptchaContext.useCaptchaContext();
102
102
  const { isProcessing, connectSocialAccount } = useSocialAuth.useSocialAuth({
103
103
  onError: () => {
104
- goToInitialView();
104
+ clearStackAndPushInitialView();
105
105
  },
106
- onFarcasterUrl: (url) => setView('farcaster-connect-view', { url }, {
106
+ onFarcasterUrl: (url) => pushView('farcaster-connect-view', { url }, {
107
107
  onBackClick: () => {
108
108
  setSocialProvider(undefined);
109
109
  dynamicEvents.dynamicEvents.emit('farcasterConnectCancelled');
@@ -127,7 +127,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
127
127
  engageCaptcha({
128
128
  authMethod: 'social',
129
129
  onCaptchaSuccess: (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
130
- setView('social-redirect-view');
130
+ pushView('social-redirect-view');
131
131
  setShowAuthFlow(true);
132
132
  connectSocialAccount({
133
133
  authMode: 'signin',
@@ -139,7 +139,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
139
139
  return;
140
140
  }
141
141
  // No Captcha enabled
142
- setView('social-redirect-view');
142
+ pushView('social-redirect-view');
143
143
  setShowAuthFlow(true);
144
144
  connectSocialAccount({
145
145
  authMode: 'signin',
@@ -93,13 +93,13 @@ import { SocialSignIn } from '../../../../../components/SocialSignIn/SocialSignI
93
93
  const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLayout, }) => {
94
94
  const { setShowAuthFlow, projectSettings } = useInternalDynamicContext();
95
95
  const { setSocialProvider, socialProvider, enabledSocialProviders } = useSocialRedirectContext();
96
- const { setView, goToInitialView } = useViewContext();
96
+ const { pushView, clearStackAndPushInitialView } = useViewContext();
97
97
  const { engageCaptcha } = useCaptchaContext();
98
98
  const { isProcessing, connectSocialAccount } = useSocialAuth({
99
99
  onError: () => {
100
- goToInitialView();
100
+ clearStackAndPushInitialView();
101
101
  },
102
- onFarcasterUrl: (url) => setView('farcaster-connect-view', { url }, {
102
+ onFarcasterUrl: (url) => pushView('farcaster-connect-view', { url }, {
103
103
  onBackClick: () => {
104
104
  setSocialProvider(undefined);
105
105
  dynamicEvents.emit('farcasterConnectCancelled');
@@ -123,7 +123,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
123
123
  engageCaptcha({
124
124
  authMethod: 'social',
125
125
  onCaptchaSuccess: (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
126
- setView('social-redirect-view');
126
+ pushView('social-redirect-view');
127
127
  setShowAuthFlow(true);
128
128
  connectSocialAccount({
129
129
  authMode: 'signin',
@@ -135,7 +135,7 @@ const DynamicSocialSignIn = ({ defaultProvider, numOfItemsToDisplay, collapsedLa
135
135
  return;
136
136
  }
137
137
  // No Captcha enabled
138
- setView('social-redirect-view');
138
+ pushView('social-redirect-view');
139
139
  setShowAuthFlow(true);
140
140
  connectSocialAccount({
141
141
  authMode: 'signin',
@@ -94,7 +94,7 @@ require('../../store/state/tokenBalances.cjs');
94
94
  require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
95
95
 
96
96
  const MergeUserAccountsView = (props) => {
97
- const { setView } = ViewContext.useViewContext();
97
+ const { pushView } = ViewContext.useViewContext();
98
98
  const { mergeUserAccounts } = useMergeUserAccounts.useMergeUserAccounts();
99
99
  const { t } = reactI18next.useTranslation();
100
100
  const [error, setError] = React.useState('');
@@ -102,9 +102,9 @@ const MergeUserAccountsView = (props) => {
102
102
  const goToConflictsResolutionView = () => {
103
103
  // back button on conflicts resolution view should go back to this view
104
104
  const onConflictsResolutionBackClick = () => {
105
- setView('merge-user-accounts', props);
105
+ pushView('merge-user-accounts', props);
106
106
  };
107
- setView('merge-user-accounts-conflicts', { mergeConflicts: (mergeConflicts === null || mergeConflicts === void 0 ? void 0 : mergeConflicts.conflicts) || [] }, {
107
+ pushView('merge-user-accounts-conflicts', { mergeConflicts: (mergeConflicts === null || mergeConflicts === void 0 ? void 0 : mergeConflicts.conflicts) || [] }, {
108
108
  onBackClick: onConflictsResolutionBackClick,
109
109
  });
110
110
  };
@@ -90,7 +90,7 @@ import '../../store/state/tokenBalances.js';
90
90
  import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
91
91
 
92
92
  const MergeUserAccountsView = (props) => {
93
- const { setView } = useViewContext();
93
+ const { pushView } = useViewContext();
94
94
  const { mergeUserAccounts } = useMergeUserAccounts();
95
95
  const { t } = useTranslation();
96
96
  const [error, setError] = useState('');
@@ -98,9 +98,9 @@ const MergeUserAccountsView = (props) => {
98
98
  const goToConflictsResolutionView = () => {
99
99
  // back button on conflicts resolution view should go back to this view
100
100
  const onConflictsResolutionBackClick = () => {
101
- setView('merge-user-accounts', props);
101
+ pushView('merge-user-accounts', props);
102
102
  };
103
- setView('merge-user-accounts-conflicts', { mergeConflicts: (mergeConflicts === null || mergeConflicts === void 0 ? void 0 : mergeConflicts.conflicts) || [] }, {
103
+ pushView('merge-user-accounts-conflicts', { mergeConflicts: (mergeConflicts === null || mergeConflicts === void 0 ? void 0 : mergeConflicts.conflicts) || [] }, {
104
104
  onBackClick: onConflictsResolutionBackClick,
105
105
  });
106
106
  };
@@ -104,7 +104,7 @@ const MergeUserAccountsWithSameEmailView = ({ returnToView }) => {
104
104
  const handleAuthenticatedUser = useHandleAuthenticatedUser.useHandleAuthenticatedUser();
105
105
  const { t } = reactI18next.useTranslation();
106
106
  const { setError } = ErrorContext.useErrorContext();
107
- const { setView, goToInitialView } = ViewContext.useViewContext();
107
+ const { pushView, clearStackAndPushInitialView } = ViewContext.useViewContext();
108
108
  const { displayedDestination: email } = VerificationContext.useVerification();
109
109
  const handleMergeUserAccounts = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
110
110
  try {
@@ -122,20 +122,20 @@ const MergeUserAccountsWithSameEmailView = ({ returnToView }) => {
122
122
  setShowAuthFlow(false, { emitCancelAuth: true });
123
123
  return;
124
124
  }
125
- goToInitialView();
125
+ clearStackAndPushInitialView();
126
126
  }
127
127
  });
128
128
  const handleUseDifferentEmail = () => {
129
129
  setError(undefined);
130
130
  if (returnToView) {
131
- setView(returnToView);
131
+ pushView(returnToView);
132
132
  return;
133
133
  }
134
134
  if (user$1) {
135
135
  setShowAuthFlow(false);
136
136
  return;
137
137
  }
138
- setView('collect-user-data');
138
+ pushView('collect-user-data');
139
139
  };
140
140
  return (jsxRuntime.jsxs("div", { className: 'merge-user-accounts-with-same-email__container', children: [jsxRuntime.jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts', children: [jsxRuntime.jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts__item', children: [jsxRuntime.jsx(walletBook.WalletIcon, { icon: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.metadata.icon, walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, className: 'merge-user-accounts-with-same-email__accounts__item__icon' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'medium', color: 'secondary', className: 'merge-user-accounts-with-same-email__accounts__item__text', children: shortenWalletAddress.shortenWalletAddress(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address, 3, 3) })] }), jsxRuntime.jsx("div", { className: 'merge-user-accounts-with-same-email__accounts__divider', children: jsxRuntime.jsx(Icon.Icon, { color: 'text-secondary', size: 'small', children: jsxRuntime.jsx(doubleArrowRight.ReactComponent, {}) }) }), jsxRuntime.jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts__item', children: [jsxRuntime.jsx(iconic.UserProfileIcon, { className: 'merge-user-accounts-with-same-email__accounts__item__icon' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'medium', color: 'secondary', className: 'merge-user-accounts-with-same-email__accounts__item__text', children: shortenEmail.shortenEmail(email, {
141
141
  breakpoint: 4,
@@ -100,7 +100,7 @@ const MergeUserAccountsWithSameEmailView = ({ returnToView }) => {
100
100
  const handleAuthenticatedUser = useHandleAuthenticatedUser();
101
101
  const { t } = useTranslation();
102
102
  const { setError } = useErrorContext();
103
- const { setView, goToInitialView } = useViewContext();
103
+ const { pushView, clearStackAndPushInitialView } = useViewContext();
104
104
  const { displayedDestination: email } = useVerification();
105
105
  const handleMergeUserAccounts = () => __awaiter(void 0, void 0, void 0, function* () {
106
106
  try {
@@ -118,20 +118,20 @@ const MergeUserAccountsWithSameEmailView = ({ returnToView }) => {
118
118
  setShowAuthFlow(false, { emitCancelAuth: true });
119
119
  return;
120
120
  }
121
- goToInitialView();
121
+ clearStackAndPushInitialView();
122
122
  }
123
123
  });
124
124
  const handleUseDifferentEmail = () => {
125
125
  setError(undefined);
126
126
  if (returnToView) {
127
- setView(returnToView);
127
+ pushView(returnToView);
128
128
  return;
129
129
  }
130
130
  if (user) {
131
131
  setShowAuthFlow(false);
132
132
  return;
133
133
  }
134
- setView('collect-user-data');
134
+ pushView('collect-user-data');
135
135
  };
136
136
  return (jsxs("div", { className: 'merge-user-accounts-with-same-email__container', children: [jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts', children: [jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts__item', children: [jsx(WalletIcon, { icon: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.metadata.icon, walletKey: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.key, className: 'merge-user-accounts-with-same-email__accounts__item__icon' }), jsx(Typography, { variant: 'body_normal', weight: 'medium', color: 'secondary', className: 'merge-user-accounts-with-same-email__accounts__item__text', children: shortenWalletAddress(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address, 3, 3) })] }), jsx("div", { className: 'merge-user-accounts-with-same-email__accounts__divider', children: jsx(Icon, { color: 'text-secondary', size: 'small', children: jsx(SvgDoubleArrowRight, {}) }) }), jsxs("div", { className: 'merge-user-accounts-with-same-email__accounts__item', children: [jsx(UserProfileIcon, { className: 'merge-user-accounts-with-same-email__accounts__item__icon' }), jsx(Typography, { variant: 'body_normal', weight: 'medium', color: 'secondary', className: 'merge-user-accounts-with-same-email__accounts__item__text', children: shortenEmail(email, {
137
137
  breakpoint: 4,
@@ -101,23 +101,23 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
101
101
  const MfaChooseDeviceView = ({ isInitialSetup = true, }) => {
102
102
  const { handleLogOut } = useDynamicContext.useDynamicContext();
103
103
  const { t } = reactI18next.useTranslation();
104
- const { setView } = ViewContext.useViewContext();
104
+ const { pushView } = ViewContext.useViewContext();
105
105
  const mfaOptions = getMfaOptions.getMfaOptions(isInitialSetup);
106
106
  const handleClick = (option) => {
107
107
  if (option.type === 'backupCode') {
108
- setView('mfa-recovery', undefined, {
108
+ pushView('mfa-recovery', undefined, {
109
109
  onBackClick: () => {
110
- setView('mfa-choose-device', { isInitialSetup: false });
110
+ pushView('mfa-choose-device', { isInitialSetup: false });
111
111
  return 'override';
112
112
  },
113
113
  });
114
114
  return;
115
115
  }
116
116
  if (isInitialSetup) {
117
- setView('mfa-secure-device', { type: option.type });
117
+ pushView('mfa-secure-device', { type: option.type });
118
118
  return;
119
119
  }
120
- setView('mfa-verification', {
120
+ pushView('mfa-verification', {
121
121
  isInitialSetup,
122
122
  showBackButton: true,
123
123
  type: option.type,