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

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 (177) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  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/HardwareWalletToggle/HardwareWalletToggle.cjs +12 -11
  10. package/src/lib/components/HardwareWalletToggle/HardwareWalletToggle.js +12 -11
  11. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +2 -2
  12. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +2 -2
  13. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +2 -2
  14. package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +2 -2
  15. package/src/lib/components/Toggle/Toggle.cjs +1 -5
  16. package/src/lib/components/Toggle/Toggle.d.ts +6 -2
  17. package/src/lib/components/Toggle/Toggle.js +1 -5
  18. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
  19. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
  20. package/src/lib/components/TransactionConfirmationPageLayout/utils.cjs +2 -2
  21. package/src/lib/components/TransactionConfirmationPageLayout/utils.d.ts +1 -1
  22. package/src/lib/components/TransactionConfirmationPageLayout/utils.js +2 -2
  23. package/src/lib/context/CaptchaContext/CaptchaContext.cjs +3 -3
  24. package/src/lib/context/CaptchaContext/CaptchaContext.js +3 -3
  25. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +1 -1
  26. package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +1 -1
  27. package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -1
  28. package/src/lib/context/DynamicContext/DynamicContext.js +8 -2
  29. package/src/lib/context/MockContext/MockContext.cjs +0 -2
  30. package/src/lib/context/MockContext/MockContext.js +0 -2
  31. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +5 -5
  32. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +5 -5
  33. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +8 -9
  34. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +8 -9
  35. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +8 -3
  36. package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +8 -3
  37. package/src/lib/context/ViewContext/ViewContext.cjs +0 -2
  38. package/src/lib/context/ViewContext/ViewContext.d.ts +0 -10
  39. package/src/lib/context/ViewContext/ViewContext.js +0 -2
  40. package/src/lib/context/ViewContext/types/index.d.ts +1 -2
  41. package/src/lib/context/WalletGroupContext/WalletGroupContext.cjs +3 -3
  42. package/src/lib/context/WalletGroupContext/WalletGroupContext.js +3 -3
  43. package/src/lib/data/api/exchangeRates/exchangeRates.cjs +9 -5
  44. package/src/lib/data/api/exchangeRates/exchangeRates.js +9 -5
  45. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -6
  46. package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -6
  47. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -4
  48. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -4
  49. package/src/lib/store/internalImplementation/store.cjs +1 -0
  50. package/src/lib/store/internalImplementation/store.d.ts +5 -1
  51. package/src/lib/store/internalImplementation/store.js +1 -0
  52. package/src/lib/styles/index.shadow.cjs +1 -1
  53. package/src/lib/styles/index.shadow.js +1 -1
  54. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +4 -0
  55. package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +4 -0
  56. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +3 -3
  57. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.d.ts +1 -1
  58. package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +3 -3
  59. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +8 -8
  60. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +8 -8
  61. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +7 -7
  62. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +7 -7
  63. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +2 -2
  64. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +2 -2
  65. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +5 -0
  66. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +5 -0
  67. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +3 -3
  68. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +3 -3
  69. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -3
  70. package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -3
  71. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +3 -3
  72. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +3 -3
  73. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +3 -3
  74. package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +3 -3
  75. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +2 -2
  76. package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +2 -2
  77. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +4 -4
  78. package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +4 -4
  79. package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.cjs +28 -10
  80. package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.js +25 -7
  81. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +6 -6
  82. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +6 -6
  83. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +2 -2
  84. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +2 -2
  85. package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +12 -12
  86. package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +12 -12
  87. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +5 -7
  88. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +5 -7
  89. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +38 -24
  90. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +3 -2
  91. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +38 -24
  92. package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.cjs +3 -3
  93. package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.js +3 -3
  94. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +5 -5
  95. package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +5 -5
  96. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +5 -5
  97. package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +5 -5
  98. package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +9 -9
  99. package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +9 -9
  100. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +6 -6
  101. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +6 -6
  102. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.cjs +12 -0
  103. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.d.ts +7 -0
  104. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.js +8 -0
  105. package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/index.d.ts +1 -0
  106. package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +5 -3
  107. package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +3 -1
  108. package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +5 -3
  109. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +12 -12
  110. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +12 -12
  111. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +8 -8
  112. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +8 -8
  113. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +14 -22
  114. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.d.ts +6 -5
  115. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +14 -22
  116. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +3 -3
  117. package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +3 -3
  118. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +2 -2
  119. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +2 -2
  120. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
  121. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
  122. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +2 -2
  123. package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +2 -2
  124. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +3 -3
  125. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +3 -3
  126. package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
  127. package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
  128. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
  129. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
  130. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +4 -4
  131. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +4 -4
  132. package/src/lib/views/LoginView/LoginView.cjs +2 -2
  133. package/src/lib/views/LoginView/LoginView.js +2 -2
  134. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +4 -4
  135. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +4 -4
  136. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +3 -3
  137. package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +3 -3
  138. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +5 -5
  139. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +5 -5
  140. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
  141. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
  142. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +4 -4
  143. package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +4 -4
  144. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +4 -9
  145. package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +4 -9
  146. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +8 -10
  147. package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +8 -10
  148. package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +5 -5
  149. package/src/lib/views/MfaVerificationView/MfaVerificationView.js +5 -5
  150. package/src/lib/views/NoAccess/NoAccess.cjs +2 -2
  151. package/src/lib/views/NoAccess/NoAccess.js +2 -2
  152. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +2 -4
  153. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +2 -4
  154. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +2 -2
  155. package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +2 -2
  156. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -2
  157. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -2
  158. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -2
  159. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -2
  160. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
  161. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
  162. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -2
  163. package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -2
  164. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +3 -3
  165. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
  166. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +9 -4
  167. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +10 -5
  168. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExternalWalletFunding/useStartExternalWalletFunding.cjs +0 -17
  169. package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExternalWalletFunding/useStartExternalWalletFunding.js +0 -17
  170. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -3
  171. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -3
  172. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +4 -4
  173. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +4 -4
  174. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +2 -2
  175. package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +2 -2
  176. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
  177. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
@@ -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,18 @@ 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, {
109
- onBackClick: () => {
110
- setView('mfa-choose-device', { isInitialSetup: false });
111
- return 'override';
112
- },
113
- });
108
+ pushView('mfa-recovery');
114
109
  return;
115
110
  }
116
111
  if (isInitialSetup) {
117
- setView('mfa-secure-device', { type: option.type });
112
+ pushView('mfa-secure-device', { type: option.type });
118
113
  return;
119
114
  }
120
- setView('mfa-verification', {
115
+ pushView('mfa-verification', {
121
116
  isInitialSetup,
122
117
  showBackButton: true,
123
118
  type: option.type,
@@ -97,23 +97,18 @@ import '../../components/Popper/PopperContext/PopperContext.js';
97
97
  const MfaChooseDeviceView = ({ isInitialSetup = true, }) => {
98
98
  const { handleLogOut } = useDynamicContext();
99
99
  const { t } = useTranslation();
100
- const { setView } = useViewContext();
100
+ const { pushView } = useViewContext();
101
101
  const mfaOptions = getMfaOptions(isInitialSetup);
102
102
  const handleClick = (option) => {
103
103
  if (option.type === 'backupCode') {
104
- setView('mfa-recovery', undefined, {
105
- onBackClick: () => {
106
- setView('mfa-choose-device', { isInitialSetup: false });
107
- return 'override';
108
- },
109
- });
104
+ pushView('mfa-recovery');
110
105
  return;
111
106
  }
112
107
  if (isInitialSetup) {
113
- setView('mfa-secure-device', { type: option.type });
108
+ pushView('mfa-secure-device', { type: option.type });
114
109
  return;
115
110
  }
116
- setView('mfa-verification', {
111
+ pushView('mfa-verification', {
117
112
  isInitialSetup,
118
113
  showBackButton: true,
119
114
  type: option.type,
@@ -101,24 +101,22 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
101
101
  const MfaSecureDeviceView = ({ type, isInitialSetup = false, }) => {
102
102
  const { t } = reactI18next.useTranslation();
103
103
  const { handleLogOut } = useDynamicContext.useDynamicContext();
104
- const { setView } = ViewContext.useViewContext();
104
+ const { pushView } = ViewContext.useViewContext();
105
105
  const { addDevice } = useMfa.useMfa();
106
106
  const { data, isLoading } = usePromise.usePromise(() => addDevice(type));
107
107
  const onContinue = () => {
108
- // back button on mfa verification view should go back to this view
109
- const onMfaVerificationBackClick = () => {
110
- setView('mfa-secure-device', { type });
111
- return 'override';
112
- };
113
- setView('mfa-verification', { deviceId: data === null || data === void 0 ? void 0 : data.id, isInitialSetup, showBackButton: true, type }, {
114
- onBackClick: onMfaVerificationBackClick,
108
+ pushView('mfa-verification', {
109
+ deviceId: data === null || data === void 0 ? void 0 : data.id,
110
+ isInitialSetup,
111
+ showBackButton: true,
112
+ type,
115
113
  });
116
114
  };
117
115
  const onHelpClick = ({ secret, uri }) => {
118
116
  const onMfaSecureDeviceHelpBackClick = () => {
119
- setView('mfa-secure-device', { isInitialSetup, type });
117
+ pushView('mfa-secure-device', { isInitialSetup, type });
120
118
  };
121
- setView('mfa-secure-device-help', {
119
+ pushView('mfa-secure-device-help', {
122
120
  secret,
123
121
  uri,
124
122
  }, { onBackClick: onMfaSecureDeviceHelpBackClick });
@@ -97,24 +97,22 @@ import '../../components/Popper/PopperContext/PopperContext.js';
97
97
  const MfaSecureDeviceView = ({ type, isInitialSetup = false, }) => {
98
98
  const { t } = useTranslation();
99
99
  const { handleLogOut } = useDynamicContext();
100
- const { setView } = useViewContext();
100
+ const { pushView } = useViewContext();
101
101
  const { addDevice } = useMfa();
102
102
  const { data, isLoading } = usePromise(() => addDevice(type));
103
103
  const onContinue = () => {
104
- // back button on mfa verification view should go back to this view
105
- const onMfaVerificationBackClick = () => {
106
- setView('mfa-secure-device', { type });
107
- return 'override';
108
- };
109
- setView('mfa-verification', { deviceId: data === null || data === void 0 ? void 0 : data.id, isInitialSetup, showBackButton: true, type }, {
110
- onBackClick: onMfaVerificationBackClick,
104
+ pushView('mfa-verification', {
105
+ deviceId: data === null || data === void 0 ? void 0 : data.id,
106
+ isInitialSetup,
107
+ showBackButton: true,
108
+ type,
111
109
  });
112
110
  };
113
111
  const onHelpClick = ({ secret, uri }) => {
114
112
  const onMfaSecureDeviceHelpBackClick = () => {
115
- setView('mfa-secure-device', { isInitialSetup, type });
113
+ pushView('mfa-secure-device', { isInitialSetup, type });
116
114
  };
117
- setView('mfa-secure-device-help', {
115
+ pushView('mfa-secure-device-help', {
118
116
  secret,
119
117
  uri,
120
118
  }, { onBackClick: onMfaSecureDeviceHelpBackClick });
@@ -97,7 +97,7 @@ require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
97
97
 
98
98
  const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = false, deviceId, }) => {
99
99
  const { t } = reactI18next.useTranslation();
100
- const { setView } = ViewContext.useViewContext();
100
+ const { pushView } = ViewContext.useViewContext();
101
101
  const { authDevice } = useMfa.useMfa();
102
102
  const [code, setCode] = React.useState('');
103
103
  const [error, setError] = React.useState();
@@ -119,7 +119,7 @@ const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = fa
119
119
  const user$1 = user.getUser();
120
120
  if ((user$1 === null || user$1 === void 0 ? void 0 : user$1.mfaBackupCodeAcknowledgement) !==
121
121
  sdkApiCore.MfaBackupCodeAcknowledgement.Complete) {
122
- setView('mfa-display-backup-codes');
122
+ pushView('mfa-display-backup-codes');
123
123
  }
124
124
  }),
125
125
  });
@@ -132,12 +132,12 @@ const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = fa
132
132
  };
133
133
  const onClickBack = () => {
134
134
  if (!isInitialSetup) {
135
- setView('mfa-choose-device', { isInitialSetup });
135
+ pushView('mfa-choose-device', { isInitialSetup });
136
136
  return;
137
137
  }
138
- setView('mfa-secure-device', { isInitialSetup, type });
138
+ pushView('mfa-secure-device', { isInitialSetup, type });
139
139
  };
140
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { MainIcon: passwordHero.ReactComponent, error: error, isLoading: isLoading, onPinComplete: onSubmit, isValid: Boolean(isValid), onPinChange: onCodeChange, description: t('dyn_mfa.otp_verification_view.body'), onClickBack: showBackButton ? onClickBack : undefined, disabled: isRateLimited }), !isInitialSetup && (jsxRuntime.jsx("div", { className: 'mfa-verification-view__choose-another-method', children: jsxRuntime.jsx(TextButton.TextButton, { className: 'mfa-verification-view__choose-another-method-button', onClick: () => setView('mfa-choose-device', { isInitialSetup }), copykey: 'dyn_mfa.otp_verification_view.choose_another_method', children: t('dyn_mfa.otp_verification_view.choose_another_method') }) }))] }));
140
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(OTPVerificationView.OTPVerificationView, { MainIcon: passwordHero.ReactComponent, error: error, isLoading: isLoading, onPinComplete: onSubmit, isValid: Boolean(isValid), onPinChange: onCodeChange, description: t('dyn_mfa.otp_verification_view.body'), onClickBack: showBackButton ? onClickBack : undefined, disabled: isRateLimited }), !isInitialSetup && (jsxRuntime.jsx("div", { className: 'mfa-verification-view__choose-another-method', children: jsxRuntime.jsx(TextButton.TextButton, { className: 'mfa-verification-view__choose-another-method-button', onClick: () => pushView('mfa-choose-device', { isInitialSetup }), copykey: 'dyn_mfa.otp_verification_view.choose_another_method', children: t('dyn_mfa.otp_verification_view.choose_another_method') }) }))] }));
141
141
  };
142
142
 
143
143
  exports.MfaVerificationView = MfaVerificationView;
@@ -93,7 +93,7 @@ import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
93
93
 
94
94
  const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = false, deviceId, }) => {
95
95
  const { t } = useTranslation();
96
- const { setView } = useViewContext();
96
+ const { pushView } = useViewContext();
97
97
  const { authDevice } = useMfa();
98
98
  const [code, setCode] = useState('');
99
99
  const [error, setError] = useState();
@@ -115,7 +115,7 @@ const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = fa
115
115
  const user = getUser();
116
116
  if ((user === null || user === void 0 ? void 0 : user.mfaBackupCodeAcknowledgement) !==
117
117
  MfaBackupCodeAcknowledgement.Complete) {
118
- setView('mfa-display-backup-codes');
118
+ pushView('mfa-display-backup-codes');
119
119
  }
120
120
  }),
121
121
  });
@@ -128,12 +128,12 @@ const MfaVerificationView = ({ type, isInitialSetup = false, showBackButton = fa
128
128
  };
129
129
  const onClickBack = () => {
130
130
  if (!isInitialSetup) {
131
- setView('mfa-choose-device', { isInitialSetup });
131
+ pushView('mfa-choose-device', { isInitialSetup });
132
132
  return;
133
133
  }
134
- setView('mfa-secure-device', { isInitialSetup, type });
134
+ pushView('mfa-secure-device', { isInitialSetup, type });
135
135
  };
136
- return (jsxs(Fragment, { children: [jsx(OTPVerificationView, { MainIcon: SvgPasswordHero, error: error, isLoading: isLoading, onPinComplete: onSubmit, isValid: Boolean(isValid), onPinChange: onCodeChange, description: t('dyn_mfa.otp_verification_view.body'), onClickBack: showBackButton ? onClickBack : undefined, disabled: isRateLimited }), !isInitialSetup && (jsx("div", { className: 'mfa-verification-view__choose-another-method', children: jsx(TextButton, { className: 'mfa-verification-view__choose-another-method-button', onClick: () => setView('mfa-choose-device', { isInitialSetup }), copykey: 'dyn_mfa.otp_verification_view.choose_another_method', children: t('dyn_mfa.otp_verification_view.choose_another_method') }) }))] }));
136
+ return (jsxs(Fragment, { children: [jsx(OTPVerificationView, { MainIcon: SvgPasswordHero, error: error, isLoading: isLoading, onPinComplete: onSubmit, isValid: Boolean(isValid), onPinChange: onCodeChange, description: t('dyn_mfa.otp_verification_view.body'), onClickBack: showBackButton ? onClickBack : undefined, disabled: isRateLimited }), !isInitialSetup && (jsx("div", { className: 'mfa-verification-view__choose-another-method', children: jsx(TextButton, { className: 'mfa-verification-view__choose-another-method-button', onClick: () => pushView('mfa-choose-device', { isInitialSetup }), copykey: 'dyn_mfa.otp_verification_view.choose_another_method', children: t('dyn_mfa.otp_verification_view.choose_another_method') }) }))] }));
137
137
  };
138
138
 
139
139
  export { MfaVerificationView };
@@ -110,10 +110,10 @@ const NoAccess = () => {
110
110
  : undefined;
111
111
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext.useInternalDynamicContext();
112
112
  const { displayedDestination: email } = VerificationContext.useVerification();
113
- const { goToInitialView } = ViewContext.useViewContext();
113
+ const { clearStackAndPushInitialView } = ViewContext.useViewContext();
114
114
  const { _socialMediaLinkText, _socialMediaUrl, isAccessListView, isGateBlockedView, subtitle, title, buttonTitle: _buttonTitle, } = useNoAccessText.useNoAccessText();
115
115
  const handleChangeWallet = () => {
116
- goToInitialView();
116
+ clearStackAndPushInitialView();
117
117
  setDeniedAddress('');
118
118
  setDeniedOauthProvider(undefined);
119
119
  walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.endSession();
@@ -106,10 +106,10 @@ const NoAccess = () => {
106
106
  : undefined;
107
107
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext();
108
108
  const { displayedDestination: email } = useVerification();
109
- const { goToInitialView } = useViewContext();
109
+ const { clearStackAndPushInitialView } = useViewContext();
110
110
  const { _socialMediaLinkText, _socialMediaUrl, isAccessListView, isGateBlockedView, subtitle, title, buttonTitle: _buttonTitle, } = useNoAccessText();
111
111
  const handleChangeWallet = () => {
112
- goToInitialView();
112
+ clearStackAndPushInitialView();
113
113
  setDeniedAddress('');
114
114
  setDeniedOauthProvider(undefined);
115
115
  walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.endSession();
@@ -115,7 +115,7 @@ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
115
115
  const [resendingCode, setResendingCode] = React.useState(false);
116
116
  const [isValid, setIsValid] = React.useState(false);
117
117
  const { t } = reactI18next.useTranslation();
118
- const { setView } = ViewContext.useViewContext();
118
+ const { pushView } = ViewContext.useViewContext();
119
119
  const { mutate, isLoading, error: error$1 } = useMutation.useMutation((bundleInput) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
120
120
  var _a;
121
121
  const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
@@ -136,9 +136,7 @@ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
136
136
  : setShowAuthFlow(false);
137
137
  };
138
138
  if (authenticatorType === 'passkey') {
139
- return setView('passkey-recovery-complete', {
140
- goBack: () => goBack(),
141
- });
139
+ return pushView('passkey-recovery-complete', { goBack });
142
140
  }
143
141
  if ((currentAction === null || currentAction === void 0 ? void 0 : currentAction.type) === 'reveal') {
144
142
  return;
@@ -111,7 +111,7 @@ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
111
111
  const [resendingCode, setResendingCode] = useState(false);
112
112
  const [isValid, setIsValid] = useState(false);
113
113
  const { t } = useTranslation();
114
- const { setView } = useViewContext();
114
+ const { pushView } = useViewContext();
115
115
  const { mutate, isLoading, error } = useMutation((bundleInput) => __awaiter(void 0, void 0, void 0, function* () {
116
116
  var _a;
117
117
  const wallet = (_a = (primaryWallet && getEOAWallet(primaryWallet))) !== null && _a !== void 0 ? _a : primaryWallet;
@@ -132,9 +132,7 @@ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
132
132
  : setShowAuthFlow(false);
133
133
  };
134
134
  if (authenticatorType === 'passkey') {
135
- return setView('passkey-recovery-complete', {
136
- goBack: () => goBack(),
137
- });
135
+ return pushView('passkey-recovery-complete', { goBack });
138
136
  }
139
137
  if ((currentAction === null || currentAction === void 0 ? void 0 : currentAction.type) === 'reveal') {
140
138
  return;
@@ -94,9 +94,9 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
94
94
 
95
95
  const SandboxMaximumThresholdReached = () => {
96
96
  const { t } = reactI18next.useTranslation();
97
- const { goToInitialView } = ViewContext.useViewContext();
97
+ const { clearStackAndPushInitialView } = ViewContext.useViewContext();
98
98
  const handleGoBack = () => {
99
- goToInitialView();
99
+ clearStackAndPushInitialView();
100
100
  };
101
101
  return (jsxRuntime.jsxs("div", { className: 'sandbox-threshold__main', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'sandbox-threshold__title', children: t('dyn_sandbox_maximum_threshold.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'sandbox-threshold__description', children: t('dyn_sandbox_maximum_threshold.description') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: handleGoBack, className: 'sandbox-threshold__button', expanded: true, buttonPadding: 'large', children: t('dyn_sandbox_maximum_threshold.button') })] }));
102
102
  };
@@ -90,9 +90,9 @@ import '../../components/Popper/PopperContext/PopperContext.js';
90
90
 
91
91
  const SandboxMaximumThresholdReached = () => {
92
92
  const { t } = useTranslation();
93
- const { goToInitialView } = useViewContext();
93
+ const { clearStackAndPushInitialView } = useViewContext();
94
94
  const handleGoBack = () => {
95
- goToInitialView();
95
+ clearStackAndPushInitialView();
96
96
  };
97
97
  return (jsxs("div", { className: 'sandbox-threshold__main', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'sandbox-threshold__title', children: t('dyn_sandbox_maximum_threshold.title') }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'sandbox-threshold__description', children: t('dyn_sandbox_maximum_threshold.description') }), jsx(TypographyButton, { onClick: handleGoBack, className: 'sandbox-threshold__button', expanded: true, buttonPadding: 'large', children: t('dyn_sandbox_maximum_threshold.button') })] }));
98
98
  };
@@ -96,7 +96,7 @@ require('../../components/Popper/Popper/Popper.cjs');
96
96
  require('../../components/Popper/PopperContext/PopperContext.cjs');
97
97
 
98
98
  const WalletCannotBeTransferredView = () => {
99
- const { goToInitialView } = ViewContext.useViewContext();
99
+ const { clearStackAndPushInitialView } = ViewContext.useViewContext();
100
100
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
101
101
  const { t } = reactI18next.useTranslation();
102
102
  const { data: walletAddress } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
@@ -105,7 +105,7 @@ const WalletCannotBeTransferredView = () => {
105
105
  }), {
106
106
  deps: [walletConnector],
107
107
  });
108
- return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { icon: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.metadata.icon, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: walletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
108
+ return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { icon: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.metadata.icon, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: walletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: clearStackAndPushInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: clearStackAndPushInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
109
109
  };
110
110
 
111
111
  exports.WalletCannotBeTransferredView = WalletCannotBeTransferredView;
@@ -92,7 +92,7 @@ import '../../components/Popper/Popper/Popper.js';
92
92
  import '../../components/Popper/PopperContext/PopperContext.js';
93
93
 
94
94
  const WalletCannotBeTransferredView = () => {
95
- const { goToInitialView } = useViewContext();
95
+ const { clearStackAndPushInitialView } = useViewContext();
96
96
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
97
97
  const { t } = useTranslation();
98
98
  const { data: walletAddress } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
@@ -101,7 +101,7 @@ const WalletCannotBeTransferredView = () => {
101
101
  }), {
102
102
  deps: [walletConnector],
103
103
  });
104
- return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { icon: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.metadata.icon, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: walletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsx(TypographyButton, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsx(TypographyButton, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
104
+ return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { icon: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.metadata.icon, walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: walletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsx(TypographyButton, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: clearStackAndPushInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsx(TypographyButton, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: clearStackAndPushInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
105
105
  };
106
106
 
107
107
  export { WalletCannotBeTransferredView };
@@ -103,7 +103,7 @@ const DefaultTile = ({ leading, name, onClick, trailing, }) => (jsxRuntime.jsx(L
103
103
  const WalletListItem = ({ disabled = false, wallet, onResetSearchValue, recommendedWallets, tile = DefaultTile, onSelectWallet, }) => {
104
104
  var _a, _b, _c, _d, _e;
105
105
  const { navigateToWalletGroup } = WalletGroupContext.useWalletGroupContext();
106
- const { setView } = ViewContext.useViewContext();
106
+ const { pushView } = ViewContext.useViewContext();
107
107
  const _isWalletGroup = isWalletGroup.isWalletGroup(wallet);
108
108
  const walletGroups = walletOptions.useWalletGroups();
109
109
  const labelSettings = getWalletListItemLabel.getWalletListItemLabel({
@@ -121,7 +121,7 @@ const WalletListItem = ({ disabled = false, wallet, onResetSearchValue, recommen
121
121
  }
122
122
  if (walletConnectorCore.isHardwareWalletConnector(wallet.walletConnector) &&
123
123
  wallet.walletConnector.canConnectWithHardwareWallet()) {
124
- setView('select-hardware-wallet', { onSelectWallet, wallet });
124
+ pushView('select-hardware-wallet', { onSelectWallet, wallet });
125
125
  return;
126
126
  }
127
127
  onSelectWallet(wallet);
@@ -99,7 +99,7 @@ const DefaultTile = ({ leading, name, onClick, trailing, }) => (jsx(ListTile, {
99
99
  const WalletListItem = ({ disabled = false, wallet, onResetSearchValue, recommendedWallets, tile = DefaultTile, onSelectWallet, }) => {
100
100
  var _a, _b, _c, _d, _e;
101
101
  const { navigateToWalletGroup } = useWalletGroupContext();
102
- const { setView } = useViewContext();
102
+ const { pushView } = useViewContext();
103
103
  const _isWalletGroup = isWalletGroup(wallet);
104
104
  const walletGroups = useWalletGroups();
105
105
  const labelSettings = getWalletListItemLabel({
@@ -117,7 +117,7 @@ const WalletListItem = ({ disabled = false, wallet, onResetSearchValue, recommen
117
117
  }
118
118
  if (isHardwareWalletConnector(wallet.walletConnector) &&
119
119
  wallet.walletConnector.canConnectWithHardwareWallet()) {
120
- setView('select-hardware-wallet', { onSelectWallet, wallet });
120
+ pushView('select-hardware-wallet', { onSelectWallet, wallet });
121
121
  return;
122
122
  }
123
123
  onSelectWallet(wallet);
@@ -97,7 +97,7 @@ require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
97
97
  var useInternalDynamicContext = require('../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
98
98
 
99
99
  const WalletSignSpinnerView = () => {
100
- const { goToInitialView } = ViewContext.useViewContext();
100
+ const { clearStackAndPushInitialView } = ViewContext.useViewContext();
101
101
  const { t } = reactI18next.useTranslation();
102
102
  const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
103
103
  if (!walletConnector) {
@@ -106,7 +106,7 @@ const WalletSignSpinnerView = () => {
106
106
  const { key, metadata } = walletConnector;
107
107
  const iconSize = 96;
108
108
  const handleClose = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
109
- goToInitialView();
109
+ clearStackAndPushInitialView();
110
110
  setMultiWalletWidgetState('idle');
111
111
  setSelectedWalletConnectorKey(null);
112
112
  yield (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.endSession());
@@ -93,7 +93,7 @@ import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
93
93
  import { useInternalDynamicContext } from '../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
94
94
 
95
95
  const WalletSignSpinnerView = () => {
96
- const { goToInitialView } = useViewContext();
96
+ const { clearStackAndPushInitialView } = useViewContext();
97
97
  const { t } = useTranslation();
98
98
  const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
99
99
  if (!walletConnector) {
@@ -102,7 +102,7 @@ const WalletSignSpinnerView = () => {
102
102
  const { key, metadata } = walletConnector;
103
103
  const iconSize = 96;
104
104
  const handleClose = () => __awaiter(void 0, void 0, void 0, function* () {
105
- goToInitialView();
105
+ clearStackAndPushInitialView();
106
106
  setMultiWalletWidgetState('idle');
107
107
  setSelectedWalletConnectorKey(null);
108
108
  yield (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.endSession());
@@ -103,7 +103,7 @@ const WalletUsedView = () => {
103
103
  const [isChecked, setIsChecked] = React.useState(false);
104
104
  const { t } = reactI18next.useTranslation();
105
105
  const { loading, setLoading } = LoadingContext.useLoadingContext();
106
- const { setView } = ViewContext.useViewContext();
106
+ const { pushView } = ViewContext.useViewContext();
107
107
  const { setShowAuthFlow, appName, siweStatement, setMultiWalletWidgetState, connectWallet, selectedWalletConnector: walletConnector, isSingleWalletAccount, handleLogOut, } = useInternalDynamicContext.useInternalDynamicContext();
108
108
  const { data: walletAddress } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
109
109
  const accounts = yield (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.getConnectedAccounts());
@@ -118,7 +118,7 @@ const WalletUsedView = () => {
118
118
  return;
119
119
  setMultiWalletWidgetState('awaiting_signature', undefined, 'transferring_wallet');
120
120
  setLoading(true);
121
- setView('wallet-sign');
121
+ pushView('wallet-sign');
122
122
  const siweStatementToUse = getSiweStatement.getSiweStatement({ appName, siweStatement });
123
123
  // TODO refactor this block
124
124
  try {
@@ -99,7 +99,7 @@ const WalletUsedView = () => {
99
99
  const [isChecked, setIsChecked] = useState(false);
100
100
  const { t } = useTranslation();
101
101
  const { loading, setLoading } = useLoadingContext();
102
- const { setView } = useViewContext();
102
+ const { pushView } = useViewContext();
103
103
  const { setShowAuthFlow, appName, siweStatement, setMultiWalletWidgetState, connectWallet, selectedWalletConnector: walletConnector, isSingleWalletAccount, handleLogOut, } = useInternalDynamicContext();
104
104
  const { data: walletAddress } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
105
105
  const accounts = yield (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.getConnectedAccounts());
@@ -114,7 +114,7 @@ const WalletUsedView = () => {
114
114
  return;
115
115
  setMultiWalletWidgetState('awaiting_signature', undefined, 'transferring_wallet');
116
116
  setLoading(true);
117
- setView('wallet-sign');
117
+ pushView('wallet-sign');
118
118
  const siweStatementToUse = getSiweStatement({ appName, siweStatement });
119
119
  // TODO refactor this block
120
120
  try {
@@ -95,7 +95,7 @@ require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
95
95
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
96
96
 
97
97
  const EditProfileView = () => {
98
- const { setView } = ViewContext.useViewContext();
98
+ const { pushView } = ViewContext.useViewContext();
99
99
  const { goToProfileView } = DynamicBridgeWidgetContext.useDynamicBridgeWidgetContext();
100
100
  const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
101
101
  const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
@@ -109,9 +109,9 @@ const EditProfileView = () => {
109
109
  ignoreIfIsEmbeddedWidget: false,
110
110
  performMultiWalletChecks: false,
111
111
  });
112
- setView(isEmailVerificationRequired ? 'verify-email' : 'verify-sms');
112
+ pushView(isEmailVerificationRequired ? 'verify-email' : 'verify-sms');
113
113
  }
114
- }), [goToProfileView, setShowAuthFlow, setView, updateUser]);
114
+ }), [goToProfileView, setShowAuthFlow, pushView, updateUser]);
115
115
  return (jsxRuntime.jsx(UserProfileForm.UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
116
116
  };
117
117