@dynamic-labs/sdk-react-core 0.19.0-alpha.17 → 0.19.0-alpha.19

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 (171) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +8 -8
  5. package/src/index.cjs +6 -0
  6. package/src/index.js +3 -0
  7. package/src/lib/components/Button/Button.cjs +2 -7
  8. package/src/lib/components/Button/Button.d.ts +0 -2
  9. package/src/lib/components/Button/Button.js +2 -7
  10. package/src/lib/components/CopyButton/CopyButton.cjs +1 -3
  11. package/src/lib/components/CopyButton/CopyButton.js +1 -3
  12. package/src/lib/components/DynamicFooter/DynamicFooter.cjs +10 -0
  13. package/src/lib/components/DynamicFooter/DynamicFooter.d.ts +2 -0
  14. package/src/lib/components/DynamicFooter/DynamicFooter.js +6 -0
  15. package/src/lib/components/DynamicFooter/index.d.ts +1 -0
  16. package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
  17. package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
  18. package/src/lib/components/ModalHeader/ModalHeader.cjs +3 -3
  19. package/src/lib/components/ModalHeader/ModalHeader.js +3 -3
  20. package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +3 -0
  21. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -5
  22. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
  23. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -5
  24. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -1
  25. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -1
  26. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.cjs +1 -1
  27. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.js +1 -1
  28. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +1 -2
  29. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +1 -2
  30. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -1
  31. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -1
  32. package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
  33. package/src/lib/components/Tooltip/Tooltip.js +1 -1
  34. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
  35. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
  36. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  37. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  38. package/src/lib/components/Typography/Typography.cjs +0 -1
  39. package/src/lib/components/Typography/Typography.js +0 -1
  40. package/src/lib/components/Typography/Typography.types.d.ts +1 -1
  41. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
  42. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
  43. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
  44. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
  45. package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
  46. package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
  47. package/src/lib/context/DynamicContext/DynamicContext.cjs +9 -9
  48. package/src/lib/context/DynamicContext/DynamicContext.js +9 -9
  49. package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.cjs +13 -0
  50. package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.d.ts +1 -1
  51. package/src/lib/context/DynamicContext/handleDisconnectWallet/handleDisconnectWallet.js +13 -0
  52. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +31 -7
  53. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +31 -7
  54. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -1
  55. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -1
  56. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +7 -20
  57. package/src/lib/layout/DynamicAuthLayout/Header/header.js +7 -20
  58. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +6 -4
  59. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +6 -4
  60. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -2
  61. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -2
  62. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
  63. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
  64. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
  65. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
  66. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
  67. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
  68. package/src/lib/locale/en/translation.cjs +13 -1
  69. package/src/lib/locale/en/translation.js +13 -1
  70. package/src/lib/main.global.cjs +1 -1
  71. package/src/lib/main.global.js +1 -1
  72. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -2
  73. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -2
  74. package/src/lib/shared/assets/arrow-left.cjs +53 -0
  75. package/src/lib/shared/assets/arrow-left.js +29 -0
  76. package/src/lib/shared/assets/arrow-right-circle.cjs +53 -0
  77. package/src/lib/shared/assets/arrow-right-circle.js +29 -0
  78. package/src/lib/shared/assets/check-connection.cjs +53 -0
  79. package/src/lib/shared/assets/check-connection.js +29 -0
  80. package/src/lib/shared/assets/index.d.ts +3 -0
  81. package/src/lib/styles/index.shadow.cjs +1 -1
  82. package/src/lib/styles/index.shadow.js +1 -1
  83. package/src/lib/utils/constants/index.d.ts +1 -1
  84. package/src/lib/utils/constants/typography.d.ts +0 -1
  85. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +22 -5
  86. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +2 -0
  87. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +22 -5
  88. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +43 -25
  89. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +3 -2
  90. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +43 -25
  91. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +24 -0
  92. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +24 -0
  93. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +2 -4
  94. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +2 -4
  95. package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +2 -2
  96. package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +2 -2
  97. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
  98. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
  99. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
  100. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
  101. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +12 -5
  102. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +12 -5
  103. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
  104. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
  105. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -1
  106. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -1
  107. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
  108. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
  109. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +6 -7
  110. package/src/lib/views/EmailUpdate/EmailUpdate.js +7 -8
  111. package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -18
  112. package/src/lib/views/EmailVerification/EmailVerification.js +13 -19
  113. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
  114. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
  115. package/src/lib/views/LoginView/LoginView.cjs +3 -5
  116. package/src/lib/views/LoginView/LoginView.js +4 -6
  117. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +2 -2
  118. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +2 -2
  119. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  120. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  121. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +4 -1
  122. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +4 -1
  123. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  124. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  125. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
  126. package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
  127. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +5 -6
  128. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +5 -6
  129. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +5 -2
  130. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
  131. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +5 -2
  132. package/src/lib/views/QrCodeView/QrCodeView.cjs +22 -23
  133. package/src/lib/views/QrCodeView/QrCodeView.js +23 -24
  134. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
  135. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
  136. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
  137. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
  138. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
  139. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
  140. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
  141. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
  142. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  143. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  144. package/src/lib/views/WalletList/WalletList.cjs +7 -3
  145. package/src/lib/views/WalletList/WalletList.js +8 -4
  146. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  147. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  148. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
  149. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
  150. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  151. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  152. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
  153. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
  154. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -1
  155. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -1
  156. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -2
  157. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -2
  158. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -2
  159. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -2
  160. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -1
  161. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -1
  162. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
  163. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
  164. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
  165. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
  166. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
  167. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
  168. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -2
  169. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -2
  170. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +2 -2
  171. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +2 -2
@@ -32,9 +32,9 @@ import { PoweredByDynamic } from '../PoweredByDynamic/PoweredByDynamic.js';
32
32
  const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, warningMessage, children, }) => {
33
33
  const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsx(SvgClose, {}) }));
34
34
  const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
35
- return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: warningMessage && (jsx("div", { className: 'transaction-confirmation__warning', children: jsx(Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: warningMessage }) })) }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading, children: "Cancel" })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
35
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: warningMessage && (jsx("div", { className: 'transaction-confirmation__warning', children: jsx(Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: warningMessage }) })) }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: "Cancel" })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
36
36
  onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
37
- }, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton, children: "Confirm" })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
37
+ }, expanded: true, loading: isLoading, disabled: disableSendButton, children: "Confirm" })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
38
38
  };
39
39
 
40
40
  export { TransactionConfirmationPageLayout };
@@ -69,7 +69,7 @@ var TransactionRow = require('../TransactionConfirmationPageLayout/components/Tr
69
69
  const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
70
70
  const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
71
71
  const networkIcon = (jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-icon', children: NetworkIcon }));
72
- return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: "Transaction successfully sent" }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__content', children: jsxRuntime.jsxs("div", { className: 'transaction-status-layout__rows', children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { label: 'Recipient', children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: 'Network', children: [networkIcon, jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: 'Total amount', children: [amount, jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__actions', children: jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone, loading: false, children: "Continue" }) }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
72
+ return (jsxRuntime.jsxs("div", { className: 'transaction-status-layout', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) }), jsxRuntime.jsxs("div", { className: 'transaction-status-layout__body', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: "Transaction successfully sent" }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__content', children: jsxRuntime.jsxs("div", { className: 'transaction-status-layout__rows', children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { label: 'Recipient', children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: 'Network', children: [networkIcon, jsxRuntime.jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxRuntime.jsxs(TransactionRow.TransactionRow, { label: 'Total amount', children: [amount, jsxRuntime.jsx(Typography.Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsxRuntime.jsx("div", { className: 'transaction-status-layout__actions', children: jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, children: "Continue" }) }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
73
73
  };
74
74
 
75
75
  exports.TransactionStatusLayout = TransactionStatusLayout;
@@ -65,7 +65,7 @@ import { TransactionRow } from '../TransactionConfirmationPageLayout/components/
65
65
  const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
66
66
  const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', children: jsx(SvgClose, {}) }));
67
67
  const networkIcon = (jsx("span", { className: 'transaction-status-layout__network-icon', children: NetworkIcon }));
68
- return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: "Transaction successfully sent" }), jsx("div", { className: 'transaction-status-layout__content', children: jsxs("div", { className: 'transaction-status-layout__rows', children: [jsx(TransactionRow, { label: 'Recipient', children: shortenWalletAddress(destinationAddress, 3, 3) }), jsxs(TransactionRow, { label: 'Network', children: [networkIcon, jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxs(TransactionRow, { label: 'Total amount', children: [amount, jsx(Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsx("div", { className: 'transaction-status-layout__actions', children: jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone, loading: false, children: "Continue" }) }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
68
+ return (jsxs("div", { className: 'transaction-status-layout', children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) }), jsxs("div", { className: 'transaction-status-layout__body', children: [jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title', children: "Transaction successfully sent" }), jsx("div", { className: 'transaction-status-layout__content', children: jsxs("div", { className: 'transaction-status-layout__rows', children: [jsx(TransactionRow, { label: 'Recipient', children: shortenWalletAddress(destinationAddress, 3, 3) }), jsxs(TransactionRow, { label: 'Network', children: [networkIcon, jsx("span", { className: 'transaction-status-layout__network-name', children: networkName })] }), jsxs(TransactionRow, { label: 'Total amount', children: [amount, jsx(Typography, { as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency', children: networkCurrency })] })] }) }), jsx("div", { className: 'transaction-status-layout__actions', children: jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', expanded: true, onClick: onDone, loading: false, children: "Continue" }) }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] })] }));
69
69
  };
70
70
 
71
71
  export { TransactionStatusLayout };
@@ -17,7 +17,6 @@ const Typography = (_a) => {
17
17
  button_tertiary: 'typography--button-tertiary',
18
18
  numbers_big: 'typography--numbers-big',
19
19
  numbers_medium: 'typography--numbers-medium',
20
- numbers_small: 'typography--numbers-small',
21
20
  title: 'typography--title',
22
21
  };
23
22
  const weightClassNameMap = {
@@ -13,7 +13,6 @@ const Typography = (_a) => {
13
13
  button_tertiary: 'typography--button-tertiary',
14
14
  numbers_big: 'typography--numbers-big',
15
15
  numbers_medium: 'typography--numbers-medium',
16
- numbers_small: 'typography--numbers-small',
17
16
  title: 'typography--title',
18
17
  };
19
18
  const weightClassNameMap = {
@@ -1,6 +1,6 @@
1
1
  import { ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';
2
2
  export type TypographyTag = ElementType;
3
- export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium' | 'numbers_small';
3
+ export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium';
4
4
  export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1';
5
5
  export type TypographyWeight = 'regular' | 'medium' | 'bold';
6
6
  export type TypographyTransform = 'uppercase';
@@ -21,7 +21,7 @@ var classNames = require('../../../../../../utils/functions/classNames/className
21
21
  var Tooltip = require('../../../../../Tooltip/Tooltip.cjs');
22
22
  var Typography = require('../../../../../Typography/Typography.cjs');
23
23
 
24
- const VerifiedEmailTooltip = (jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_small', color: 'tooltip', children: "This email is verified" }));
24
+ const VerifiedEmailTooltip = (jsxRuntime.jsx(Typography.Typography, { variant: 'numbers_medium', color: 'tooltip', children: "This email is verified" }));
25
25
  const VerifiedEmailIcon = ({ className, overwriteTooltipProps, }) => {
26
26
  const { user } = useInternalDynamicContext.useInternalDynamicContext();
27
27
  if (!(user === null || user === void 0 ? void 0 : user.email))
@@ -17,7 +17,7 @@ import { classNames } from '../../../../../../utils/functions/classNames/classNa
17
17
  import { Tooltip } from '../../../../../Tooltip/Tooltip.js';
18
18
  import { Typography } from '../../../../../Typography/Typography.js';
19
19
 
20
- const VerifiedEmailTooltip = (jsx(Typography, { variant: 'numbers_small', color: 'tooltip', children: "This email is verified" }));
20
+ const VerifiedEmailTooltip = (jsx(Typography, { variant: 'numbers_medium', color: 'tooltip', children: "This email is verified" }));
21
21
  const VerifiedEmailIcon = ({ className, overwriteTooltipProps, }) => {
22
22
  const { user } = useInternalDynamicContext();
23
23
  if (!(user === null || user === void 0 ? void 0 : user.email))
@@ -74,7 +74,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
74
74
  const isActiveCredential = !primaryWallet &&
75
75
  connectedAccountInfo &&
76
76
  (connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
77
- const renderButton = () => (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => isProviderLinked
77
+ const renderButton = () => (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonPadding: 'none', onClick: () => isProviderLinked
78
78
  ? unlinkSocialAccount(provider)
79
79
  : linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
80
80
  color: 'secondary',
@@ -70,7 +70,7 @@ const UserProfileSocialAccount = ({ provider, }) => {
70
70
  const isActiveCredential = !primaryWallet &&
71
71
  connectedAccountInfo &&
72
72
  (connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.id) === (user === null || user === void 0 ? void 0 : user.lastVerifiedCredentialId);
73
- const renderButton = () => (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => isProviderLinked
73
+ const renderButton = () => (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonPadding: 'none', onClick: () => isProviderLinked
74
74
  ? unlinkSocialAccount(provider)
75
75
  : linkSocialAccount(provider), loading: isProcessing, dataTestId: `social-account-${isProviderLinked ? 'disconnect' : 'connect'}-button`, typographyProps: {
76
76
  color: 'secondary',
@@ -48,7 +48,7 @@ const UserProfileForm = ({ filterFields, formClassName, fieldsContainerStyle, on
48
48
  shouldEnforcePolicies: options.shouldEnforcePolicies,
49
49
  userProfile: user,
50
50
  });
51
- const makeButtonsContent = (isSubmitting, isValid, dirty) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!options.hideCancelButton && (jsxRuntime.jsx(Button.Button, Object.assign({ disabled: fetch, buttonRounded: 'small', expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: onEditProfileCancel, dataTestId: 'cancel-button' }, options.cancelButtonProps, { children: options.cancelText }))), jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, buttonRounded: 'small', expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsxRuntime.jsx(check.ReactComponent, {}), dataTestId: 'submit-button' }, options.submitButtonProps, { children: options.submitText }))] }));
51
+ const makeButtonsContent = (isSubmitting, isValid, dirty) => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!options.hideCancelButton && (jsxRuntime.jsx(Button.Button, Object.assign({ disabled: fetch, expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: onEditProfileCancel, dataTestId: 'cancel-button' }, options.cancelButtonProps, { children: options.cancelText }))), jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsxRuntime.jsx(check.ReactComponent, {}), dataTestId: 'submit-button' }, options.submitButtonProps, { children: options.submitText }))] }));
52
52
  return (jsxRuntime.jsx(formik.Formik, { onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true, children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxRuntime.jsxs(formik.Form, { className: classNames.classNames('dynamic-widget-edit-profile-view', formClassName), "data-testid": 'editUserProfileForm', children: [jsxRuntime.jsx("div", { className: 'dynamic-widget-edit-profile-view__fields', style: fieldsContainerStyle, children: jsxRuntime.jsx(index.UserDataFields, { errors: errors, fields: targetFields, touched: touched }) }), options.buttonsAsFooter ? (jsxRuntime.jsx(DynamicWidgetFooter.DynamicWidgetFooter, { children: makeButtonsContent(isSubmitting, isValid, dirty) })) : (makeButtonsContent(isSubmitting, isValid, dirty))] })) }));
53
53
  };
54
54
 
@@ -44,7 +44,7 @@ const UserProfileForm = ({ filterFields, formClassName, fieldsContainerStyle, on
44
44
  shouldEnforcePolicies: options.shouldEnforcePolicies,
45
45
  userProfile: user,
46
46
  });
47
- const makeButtonsContent = (isSubmitting, isValid, dirty) => (jsxs(Fragment, { children: [!options.hideCancelButton && (jsx(Button, Object.assign({ disabled: fetch, buttonRounded: 'small', expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: onEditProfileCancel, dataTestId: 'cancel-button' }, options.cancelButtonProps, { children: options.cancelText }))), jsx(Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, buttonRounded: 'small', expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsx(SvgCheck, {}), dataTestId: 'submit-button' }, options.submitButtonProps, { children: options.submitText }))] }));
47
+ const makeButtonsContent = (isSubmitting, isValid, dirty) => (jsxs(Fragment, { children: [!options.hideCancelButton && (jsx(Button, Object.assign({ disabled: fetch, expanded: true, buttonPadding: 'medium', buttonVariant: 'secondary', type: 'button', typographyProps: { variant: 'button_secondary' }, onClick: onEditProfileCancel, dataTestId: 'cancel-button' }, options.cancelButtonProps, { children: options.cancelText }))), jsx(Button, Object.assign({ buttonClassName: 'dynamic-widget-footer__button', disabled: fetch || !isValid || !dirty, expanded: true, type: 'submit', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, loading: isSubmitting, startSlot: jsx(SvgCheck, {}), dataTestId: 'submit-button' }, options.submitButtonProps, { children: options.submitText }))] }));
48
48
  return (jsx(Formik, { onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema, validateOnChange: true, children: ({ errors, touched, isSubmitting, isValid, dirty }) => (jsxs(Form, { className: classNames('dynamic-widget-edit-profile-view', formClassName), "data-testid": 'editUserProfileForm', children: [jsx("div", { className: 'dynamic-widget-edit-profile-view__fields', style: fieldsContainerStyle, children: jsx(UserDataFields, { errors: errors, fields: targetFields, touched: touched }) }), options.buttonsAsFooter ? (jsx(DynamicWidgetFooter, { children: makeButtonsContent(isSubmitting, isValid, dirty) })) : (makeButtonsContent(isSubmitting, isValid, dirty))] })) }));
49
49
  };
50
50
 
@@ -202,8 +202,9 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
202
202
  clearPrimaryWalletId,
203
203
  enableVisitTrackingOnConnectOnly,
204
204
  environmentId,
205
+ isBridgeFlow,
205
206
  onBeforeConnectSuccessConfirmation: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onBeforeConnectSuccessConfirmation,
206
- onUnlink: (wallet, connectedWalletsInfo) => handleDisconnectWallet.handleDisconnectWallet({
207
+ onUnlink: (connectedWalletsInfo, wallet) => handleDisconnectWallet.handleDisconnectWallet({
207
208
  connectedWalletsInfo,
208
209
  eventsCallbacks,
209
210
  setWalletsToConnectByChain,
@@ -398,7 +399,6 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
398
399
  onConnectSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onConnectSuccess,
399
400
  onEmailVerificationFailure,
400
401
  onEmailVerificationSuccess,
401
- onEmbeddedWalletCreated: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmbeddedWalletCreated,
402
402
  onLinkSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onLinkSuccess,
403
403
  onUserProfileUpdate: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onUserProfileUpdate,
404
404
  },
@@ -724,13 +724,13 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
724
724
  setShowDynamicUserProfile(true);
725
725
  }
726
726
  }, [multiWallet, multiWalletWidgetState, showDynamicUserProfile, user]);
727
- return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsx(ViewContext.ViewContextProvider, { initialView: helpers.getInitialView({
728
- connectedWallets,
729
- isAuthenticated,
730
- isBridgeFlow,
731
- isFullyConnected,
732
- isMultiWalletEnabled: multiWallet,
733
- }), children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { canSync: didConnectedStateLoad, children: jsxRuntime.jsx(QrCodeContext.QrCodeContextProvider, { children: jsxRuntime.jsx(EmailVerificationContext.EmailVerificationContextProvider, { children: jsxRuntime.jsx(ErrorContext.ErrorContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(FundingContext.FundingContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsxs(UserFieldEditorContext.UserFieldEditorContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(Toolkit.Toolkit, {}), jsxRuntime.jsx(FundingWidget.FundingWidget, {}), jsxRuntime.jsx(SyncPasskeyFlow.SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
727
+ return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsx(ErrorContext.ErrorContextProvider, { children: jsxRuntime.jsx(ViewContext.ViewContextProvider, { initialView: helpers.getInitialView({
728
+ connectedWallets,
729
+ isAuthenticated,
730
+ isBridgeFlow,
731
+ isFullyConnected,
732
+ isMultiWalletEnabled: multiWallet,
733
+ }), children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { canSync: didConnectedStateLoad, children: jsxRuntime.jsx(QrCodeContext.QrCodeContextProvider, { children: jsxRuntime.jsx(EmailVerificationContext.EmailVerificationContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(FundingContext.FundingContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsxs(UserFieldEditorContext.UserFieldEditorContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(Toolkit.Toolkit, {}), jsxRuntime.jsx(FundingWidget.FundingWidget, {}), jsxRuntime.jsx(SyncPasskeyFlow.SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
734
734
  };
735
735
 
736
736
  exports.DynamicContext = DynamicContext;
@@ -198,8 +198,9 @@ const DynamicContextProvider = ({ children, theme, settings, locale, }) => {
198
198
  clearPrimaryWalletId,
199
199
  enableVisitTrackingOnConnectOnly,
200
200
  environmentId,
201
+ isBridgeFlow,
201
202
  onBeforeConnectSuccessConfirmation: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onBeforeConnectSuccessConfirmation,
202
- onUnlink: (wallet, connectedWalletsInfo) => handleDisconnectWallet({
203
+ onUnlink: (connectedWalletsInfo, wallet) => handleDisconnectWallet({
203
204
  connectedWalletsInfo,
204
205
  eventsCallbacks,
205
206
  setWalletsToConnectByChain,
@@ -394,7 +395,6 @@ const DynamicContextProvider = ({ children, theme, settings, locale, }) => {
394
395
  onConnectSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onConnectSuccess,
395
396
  onEmailVerificationFailure,
396
397
  onEmailVerificationSuccess,
397
- onEmbeddedWalletCreated: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onEmbeddedWalletCreated,
398
398
  onLinkSuccess: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onLinkSuccess,
399
399
  onUserProfileUpdate: eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onUserProfileUpdate,
400
400
  },
@@ -720,13 +720,13 @@ const DynamicContextProvider = ({ children, theme, settings, locale, }) => {
720
720
  setShowDynamicUserProfile(true);
721
721
  }
722
722
  }, [multiWallet, multiWalletWidgetState, showDynamicUserProfile, user]);
723
- return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsx(ViewContextProvider, { initialView: getInitialView({
724
- connectedWallets,
725
- isAuthenticated,
726
- isBridgeFlow,
727
- isFullyConnected,
728
- isMultiWalletEnabled: multiWallet,
729
- }), children: jsx(AccountExistsContextProvider, { children: jsx(WalletContextProvider, { canSync: didConnectedStateLoad, children: jsx(QrCodeContextProvider, { children: jsx(EmailVerificationContextProvider, { children: jsx(ErrorContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(DynamicBridgeWidgetContextProvider, { children: jsx(CaptchaContextProvider, { children: jsx(FundingContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsx(SendBalanceContextProvider, { children: jsx(WalletGroupContextProvider, { children: jsxs(UserFieldEditorContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(Toolkit, {}), jsx(FundingWidget, {}), jsx(SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
723
+ return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsx(ErrorContextProvider, { children: jsx(ViewContextProvider, { initialView: getInitialView({
724
+ connectedWallets,
725
+ isAuthenticated,
726
+ isBridgeFlow,
727
+ isFullyConnected,
728
+ isMultiWalletEnabled: multiWallet,
729
+ }), children: jsx(AccountExistsContextProvider, { children: jsx(WalletContextProvider, { canSync: didConnectedStateLoad, children: jsx(QrCodeContextProvider, { children: jsx(EmailVerificationContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(DynamicBridgeWidgetContextProvider, { children: jsx(CaptchaContextProvider, { children: jsx(FundingContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsx(SendBalanceContextProvider, { children: jsx(WalletGroupContextProvider, { children: jsxs(UserFieldEditorContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(Toolkit, {}), jsx(FundingWidget, {}), jsx(SyncPasskeyFlow, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }));
730
730
  };
731
731
 
732
732
  export { DynamicContext, DynamicContextProvider, PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID };
@@ -21,6 +21,19 @@ const handleDisconnectWallet = ({ wallet, connectedWalletsInfo, walletsByChain,
21
21
  var _a;
22
22
  const missingChains = getMissingChains.getMissingChains(walletsByChain, connectedWalletsInfo);
23
23
  setWalletsToConnectByChain(missingChains);
24
+ // there might not be a wallet to disconnect because
25
+ // the connectedWallets state may never have been initialized.
26
+ // this is because we asyncronously init the connectedWallets,
27
+ // and as part of the async init we fetch the address and network.
28
+ // if either of these fails, we consider the wallet disconnected,
29
+ // and call this function.
30
+ //
31
+ // ideally, we would syncronously populate connectedWallets
32
+ // based off the connectedWalletsInfo, and then async update it
33
+ // with the network and address from the wallet
34
+ if (!wallet) {
35
+ return;
36
+ }
24
37
  try {
25
38
  (_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onDisconnect) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, {
26
39
  walletConnector: wallet.connector,
@@ -3,7 +3,7 @@ import { DynamicEventsCallbacks, Wallet } from '../../../shared';
3
3
  import { ConnectedWalletConnectorType } from '../../../utils/hooks/useConnectWallet/useConnectWallet';
4
4
  import { ChainsToConnect } from '../types';
5
5
  type HandleDisconnectWalletArgs = {
6
- wallet: Wallet;
6
+ wallet?: Wallet;
7
7
  connectedWalletsInfo: ConnectedWalletConnectorType[];
8
8
  walletsByChain: ChainsToConnect[] | undefined;
9
9
  setWalletsToConnectByChain: Dispatch<SetStateAction<ChainsToConnect[] | undefined>>;
@@ -17,6 +17,19 @@ const handleDisconnectWallet = ({ wallet, connectedWalletsInfo, walletsByChain,
17
17
  var _a;
18
18
  const missingChains = getMissingChains(walletsByChain, connectedWalletsInfo);
19
19
  setWalletsToConnectByChain(missingChains);
20
+ // there might not be a wallet to disconnect because
21
+ // the connectedWallets state may never have been initialized.
22
+ // this is because we asyncronously init the connectedWallets,
23
+ // and as part of the async init we fetch the address and network.
24
+ // if either of these fails, we consider the wallet disconnected,
25
+ // and call this function.
26
+ //
27
+ // ideally, we would syncronously populate connectedWallets
28
+ // based off the connectedWalletsInfo, and then async update it
29
+ // with the network and address from the wallet
30
+ if (!wallet) {
31
+ return;
32
+ }
20
33
  try {
21
34
  (_a = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onDisconnect) === null || _a === void 0 ? void 0 : _a.call(eventsCallbacks, {
22
35
  walletConnector: wallet.connector,
@@ -62,7 +62,7 @@ require('../UserFieldEditorContext/UserFieldEditorContext.cjs');
62
62
  const SocialRedirectContext = React.createContext(undefined);
63
63
  const SocialRedirectContextProvider = ({ children, }) => {
64
64
  var _a, _b, _c, _d;
65
- const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, } = useInternalDynamicContext.useInternalDynamicContext();
65
+ const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, primaryWallet, } = useInternalDynamicContext.useInternalDynamicContext();
66
66
  const { setErrorMessage } = ErrorContext.useErrorContext();
67
67
  const { setView } = ViewContext.useViewContext();
68
68
  const verifyWallet = useVerifyWallet.useVerifyWallet({
@@ -82,7 +82,10 @@ const SocialRedirectContextProvider = ({ children, }) => {
82
82
  .find(walletConnectorCore.isSocialWalletConnector);
83
83
  const [redirectStatus, setRedirectStatus] = React.useState('idle');
84
84
  const [socialProvider, setSocialProvider] = React.useState();
85
- const wallet = secondaryWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
85
+ const userWallets = primaryWallet
86
+ ? [primaryWallet, ...secondaryWallets]
87
+ : secondaryWallets;
88
+ const wallet = userWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
86
89
  const socialAccount = React.useMemo(() => (wallet ? getReferencedAccount.getReferencedAccount(authToken, wallet.id) : undefined), [authToken, wallet]);
87
90
  const handleError = React.useCallback((message) => {
88
91
  logger.logger.error(message);
@@ -143,12 +146,32 @@ const SocialRedirectContextProvider = ({ children, }) => {
143
146
  if (!socialAccount) {
144
147
  throw new Error('Social account not found');
145
148
  }
149
+ /**
150
+ * consider google: a user may have multiple google accounts.
151
+ * we need to make sure they connected with the same google account
152
+ * that they originally used to authenticate
153
+ *
154
+ * there are two known scenarios that we enter this branch:
155
+ * 1. the user is reconnected a social wallet:
156
+ * a. the user signed in with social
157
+ * b. the user then linked another wallet (for ex: metamask)
158
+ * c. the user signed out
159
+ * d. the user signed in with metamask
160
+ * e. the user selects their social wallet as their primary wallet
161
+ * f. we need to reconnect the social wallet and put the user in the social oauth redirect flow
162
+ *
163
+ * 2. for an unknown reason, the magic search params get put back into the url and this component rerenders,
164
+ * causing us to think the user is reconnecting.
165
+ * see: https://dynamiclabsgroup.slack.com/archives/C0473MNEP0T/p1697503460754999
166
+ */
146
167
  if (socialAccount.oauthAccountId === session.oauthId) {
147
- // justification: socialAccount is defined if and only if wallet is also defined
148
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
149
- setPrimaryWalletId(wallet.id);
150
- setShowAuthFlow(false);
151
- setShowDynamicUserProfile(true);
168
+ if ((wallet === null || wallet === void 0 ? void 0 : wallet.id) !== (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.id)) {
169
+ // justification: socialAccount is defined if and only if wallet is also defined
170
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
171
+ setPrimaryWalletId(wallet.id);
172
+ setShowAuthFlow(false);
173
+ setShowDynamicUserProfile(true);
174
+ }
152
175
  }
153
176
  else {
154
177
  yield socialWalletConnector.endSession();
@@ -200,6 +223,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
200
223
  wallet,
201
224
  handleError,
202
225
  connectWallet,
226
+ primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.id,
203
227
  ]);
204
228
  return (jsxRuntime.jsx(SocialRedirectContext.Provider, { value: {
205
229
  enabledSocialProviders,
@@ -58,7 +58,7 @@ import '../UserFieldEditorContext/UserFieldEditorContext.js';
58
58
  const SocialRedirectContext = createContext(undefined);
59
59
  const SocialRedirectContextProvider = ({ children, }) => {
60
60
  var _a, _b, _c, _d;
61
- const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, } = useInternalDynamicContext();
61
+ const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, connectWallet, primaryWallet, } = useInternalDynamicContext();
62
62
  const { setErrorMessage } = useErrorContext();
63
63
  const { setView } = useViewContext();
64
64
  const verifyWallet = useVerifyWallet({
@@ -78,7 +78,10 @@ const SocialRedirectContextProvider = ({ children, }) => {
78
78
  .find(isSocialWalletConnector);
79
79
  const [redirectStatus, setRedirectStatus] = useState('idle');
80
80
  const [socialProvider, setSocialProvider] = useState();
81
- const wallet = secondaryWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
81
+ const userWallets = primaryWallet
82
+ ? [primaryWallet, ...secondaryWallets]
83
+ : secondaryWallets;
84
+ const wallet = userWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
82
85
  const socialAccount = useMemo(() => (wallet ? getReferencedAccount(authToken, wallet.id) : undefined), [authToken, wallet]);
83
86
  const handleError = useCallback((message) => {
84
87
  logger.error(message);
@@ -139,12 +142,32 @@ const SocialRedirectContextProvider = ({ children, }) => {
139
142
  if (!socialAccount) {
140
143
  throw new Error('Social account not found');
141
144
  }
145
+ /**
146
+ * consider google: a user may have multiple google accounts.
147
+ * we need to make sure they connected with the same google account
148
+ * that they originally used to authenticate
149
+ *
150
+ * there are two known scenarios that we enter this branch:
151
+ * 1. the user is reconnected a social wallet:
152
+ * a. the user signed in with social
153
+ * b. the user then linked another wallet (for ex: metamask)
154
+ * c. the user signed out
155
+ * d. the user signed in with metamask
156
+ * e. the user selects their social wallet as their primary wallet
157
+ * f. we need to reconnect the social wallet and put the user in the social oauth redirect flow
158
+ *
159
+ * 2. for an unknown reason, the magic search params get put back into the url and this component rerenders,
160
+ * causing us to think the user is reconnecting.
161
+ * see: https://dynamiclabsgroup.slack.com/archives/C0473MNEP0T/p1697503460754999
162
+ */
142
163
  if (socialAccount.oauthAccountId === session.oauthId) {
143
- // justification: socialAccount is defined if and only if wallet is also defined
144
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
145
- setPrimaryWalletId(wallet.id);
146
- setShowAuthFlow(false);
147
- setShowDynamicUserProfile(true);
164
+ if ((wallet === null || wallet === void 0 ? void 0 : wallet.id) !== (primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.id)) {
165
+ // justification: socialAccount is defined if and only if wallet is also defined
166
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
167
+ setPrimaryWalletId(wallet.id);
168
+ setShowAuthFlow(false);
169
+ setShowDynamicUserProfile(true);
170
+ }
148
171
  }
149
172
  else {
150
173
  yield socialWalletConnector.endSession();
@@ -196,6 +219,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
196
219
  wallet,
197
220
  handleError,
198
221
  connectWallet,
222
+ primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.id,
199
223
  ]);
200
224
  return (jsx(SocialRedirectContext.Provider, { value: {
201
225
  enabledSocialProviders,
@@ -35,6 +35,7 @@ var OverlayCardTarget = require('../../components/OverlayCard/OverlayCardTarget.
35
35
  var index = require('../../context/FooterAnimationContext/index.cjs');
36
36
  var useAuthLayoutChecks = require('../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs');
37
37
  var useDynamicLayoutData = require('../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs');
38
+ var DynamicFooter = require('../../components/DynamicFooter/DynamicFooter.cjs');
38
39
  var header = require('./Header/header.cjs');
39
40
  require('../../context/WalletGroupContext/WalletGroupContext.cjs');
40
41
  var HelpContent = require('./HelpContent/HelpContent.cjs');
@@ -75,7 +76,8 @@ const DynamicAuthLayout = ({ children, className, onClose, projectSettings, hide
75
76
  view,
76
77
  });
77
78
  const { showConnectedWalletProgress } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
78
- return (jsxRuntime.jsx(OverlayCardTarget.OverlayCardTarget, { children: jsxRuntime.jsxs(VerticalAccordion.VerticalAccordion, { className: className, children: [jsxRuntime.jsxs(AccordionItem.AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsxRuntime.jsx(WalletProgressStepper.WalletProgressStepper, {})), showHeader && (jsxRuntime.jsx(header.Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector })), children, showToSFooter && jsxRuntime.jsx(ToSFooter.ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsxRuntime.jsx(AccordionItem.AccordionItem, { isOpen: isFooterExpanded, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(HelpContent.HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
79
+ const { showDynamicFooter } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
80
+ return (jsxRuntime.jsx(OverlayCardTarget.OverlayCardTarget, { children: jsxRuntime.jsxs(VerticalAccordion.VerticalAccordion, { className: className, children: [jsxRuntime.jsxs(AccordionItem.AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsxRuntime.jsx(WalletProgressStepper.WalletProgressStepper, {})), showHeader && (jsxRuntime.jsx(header.Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector })), children, showDynamicFooter && jsxRuntime.jsx(DynamicFooter.DynamicFooter, {}), showToSFooter && jsxRuntime.jsx(ToSFooter.ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsxRuntime.jsx(AccordionItem.AccordionItem, { isOpen: isFooterExpanded, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(HelpContent.HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
79
81
  };
80
82
 
81
83
  exports.DynamicAuthLayout = DynamicAuthLayout;
@@ -31,6 +31,7 @@ import { OverlayCardTarget } from '../../components/OverlayCard/OverlayCardTarge
31
31
  import { useFooterAnimationContext } from '../../context/FooterAnimationContext/index.js';
32
32
  import { useAuthLayoutChecks } from '../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
33
33
  import { useDynamicLayoutData } from '../../utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js';
34
+ import { DynamicFooter } from '../../components/DynamicFooter/DynamicFooter.js';
34
35
  import { Header } from './Header/header.js';
35
36
  import '../../context/WalletGroupContext/WalletGroupContext.js';
36
37
  import { HelpContent } from './HelpContent/HelpContent.js';
@@ -71,7 +72,8 @@ const DynamicAuthLayout = ({ children, className, onClose, projectSettings, hide
71
72
  view,
72
73
  });
73
74
  const { showConnectedWalletProgress } = useAuthLayoutChecks(walletConnector);
74
- return (jsx(OverlayCardTarget, { children: jsxs(VerticalAccordion, { className: className, children: [jsxs(AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsx(WalletProgressStepper, {})), showHeader && (jsx(Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector })), children, showToSFooter && jsx(ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsx(AccordionItem, { isOpen: isFooterExpanded, children: jsx("div", { children: jsx(HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
75
+ const { showDynamicFooter } = useAuthLayoutChecks(walletConnector);
76
+ return (jsx(OverlayCardTarget, { children: jsxs(VerticalAccordion, { className: className, children: [jsxs(AccordionItem, { isOpen: !isFooterExpanded, dimOnHide: true, children: [showConnectedWalletProgress && !hideBridgeProgressSteppers && (jsx(WalletProgressStepper, {})), showHeader && (jsx(Header, { onClose: onClose, heading: (headerData === null || headerData === void 0 ? void 0 : headerData.heading) || '', projectSettings: projectSettings, walletConnector: walletConnector })), children, showDynamicFooter && jsx(DynamicFooter, {}), showToSFooter && jsx(ToSFooter, {})] }), helpHeaderData && showHelpContent && (jsx(AccordionItem, { isOpen: isFooterExpanded, children: jsx("div", { children: jsx(HelpContent, {}) }, isFooterExpanded.toString()) }))] }) }));
75
77
  };
76
78
 
77
79
  export { DynamicAuthLayout };
@@ -10,8 +10,8 @@ require('../../../shared/logger.cjs');
10
10
  require('@dynamic-labs/iconic');
11
11
  require('@dynamic-labs/wallet-connector-core');
12
12
  var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
13
+ var arrowLeft = require('../../../shared/assets/arrow-left.cjs');
13
14
  var close = require('../../../shared/assets/close.cjs');
14
- var chevronLeft = require('../../../shared/assets/chevron-left.cjs');
15
15
  var footerInfoIcon = require('../../../shared/assets/footer-info-icon.cjs');
16
16
  var questionMark = require('../../../shared/assets/question-mark.cjs');
17
17
  require('@dynamic-labs/wallet-book');
@@ -70,8 +70,8 @@ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnecto
70
70
  const { setError } = ErrorContext.useErrorContext();
71
71
  const { setShowQrCodeImage } = QrCodeContext.useQrCodeContext();
72
72
  const { isFooterExpanded, setIsFooterExpanded } = index.useFooterAnimationContext();
73
- const { view, goToInitialView } = ViewContext.useViewContext();
74
- const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
73
+ const { goToInitialView } = ViewContext.useViewContext();
74
+ const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, displayBorderBelowHeader, } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
75
75
  const { setExistentAccountData } = AccountExistsContext.useAccountExistsContext();
76
76
  const handleBackClick = React.useCallback(() => {
77
77
  goToInitialView();
@@ -93,28 +93,15 @@ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnecto
93
93
  if (showBackButton) {
94
94
  buttons = [
95
95
  ...buttons,
96
- jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }, 'back-button'),
97
- ];
98
- }
99
- if (showHelpContent) {
100
- buttons = [
101
- ...buttons,
102
- jsxRuntime.jsx(Tooltip.Tooltip, { content: 'Need some help?', className: 'header__tooltip', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon', children: isWalletListTypeView ? jsxRuntime.jsx(questionMark.ReactComponent, {}) : jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }, 'info-button'),
96
+ jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon', children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }, 'back-button'),
103
97
  ];
104
98
  }
105
99
  return buttons;
106
- }, [
107
- handleBackClick,
108
- isFooterExpanded,
109
- isWalletListTypeView,
110
- setIsFooterExpanded,
111
- showBackButton,
112
- showHelpContent,
113
- ]);
100
+ }, [handleBackClick, showBackButton]);
114
101
  const closeButton = showCloseButton && handleClose && (jsxRuntime.jsx(IconButton.IconButton, { onClick: handleClose, type: 'button', id: 'close-button', "data-testid": 'close-button', className: 'header__icon', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
102
+ const infoButton = showHelpContent && (jsxRuntime.jsx(Tooltip.Tooltip, { content: 'Need some help?', className: 'header__tooltip', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon', children: isWalletListTypeView ? jsxRuntime.jsx(questionMark.ReactComponent, {}) : jsxRuntime.jsx(footerInfoIcon.ReactComponent, {}) }) }, 'info-button'));
115
103
  const qrCodePreHeader = (jsxRuntime.jsxs("div", { className: 'qr-code-view__scan-issue-message', children: [jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'body_small', children: "If you're having issues scanning, click\u00A0" }), jsxRuntime.jsx("button", { className: 'qr-code-view__scan-issue-button', onClick: () => setShowQrCodeImage(true), children: "here" })] }));
116
- const positionAbsolute = view === 'login-with-email-verification';
117
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: leadingButtons, trailing: closeButton, positionAbsolute: positionAbsolute, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'header__skeleton' })) : (heading) }) })] }));
104
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: leadingButtons, trailing: infoButton || closeButton, displayBorder: displayBorderBelowHeader, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'header__skeleton' })) : (heading) }) }), showQrCodePreHeader && qrCodePreHeader] }));
118
105
  };
119
106
 
120
107
  exports.Header = Header;
@@ -6,8 +6,8 @@ import '../../../shared/logger.js';
6
6
  import '@dynamic-labs/iconic';
7
7
  import '@dynamic-labs/wallet-connector-core';
8
8
  import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
9
+ import { ReactComponent as SvgArrowLeft } from '../../../shared/assets/arrow-left.js';
9
10
  import { ReactComponent as SvgClose } from '../../../shared/assets/close.js';
10
- import { ReactComponent as SvgChevronLeft } from '../../../shared/assets/chevron-left.js';
11
11
  import { ReactComponent as SvgFooterInfoIcon } from '../../../shared/assets/footer-info-icon.js';
12
12
  import { ReactComponent as SvgQuestionMark } from '../../../shared/assets/question-mark.js';
13
13
  import '@dynamic-labs/wallet-book';
@@ -66,8 +66,8 @@ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnecto
66
66
  const { setError } = useErrorContext();
67
67
  const { setShowQrCodeImage } = useQrCodeContext();
68
68
  const { isFooterExpanded, setIsFooterExpanded } = useFooterAnimationContext();
69
- const { view, goToInitialView } = useViewContext();
70
- const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, } = useAuthLayoutChecks(walletConnector);
69
+ const { goToInitialView } = useViewContext();
70
+ const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, displayBorderBelowHeader, } = useAuthLayoutChecks(walletConnector);
71
71
  const { setExistentAccountData } = useAccountExistsContext();
72
72
  const handleBackClick = useCallback(() => {
73
73
  goToInitialView();
@@ -89,28 +89,15 @@ const Header = ({ onClose: handleClose, heading, projectSettings, walletConnecto
89
89
  if (showBackButton) {
90
90
  buttons = [
91
91
  ...buttons,
92
- jsx(IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon', children: jsx(SvgChevronLeft, {}) }, 'back-button'),
93
- ];
94
- }
95
- if (showHelpContent) {
96
- buttons = [
97
- ...buttons,
98
- jsx(Tooltip, { content: 'Need some help?', className: 'header__tooltip', children: jsx(IconButton, { type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon', children: isWalletListTypeView ? jsx(SvgQuestionMark, {}) : jsx(SvgFooterInfoIcon, {}) }) }, 'info-button'),
92
+ jsx(IconButton, { type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon', children: jsx(SvgArrowLeft, {}) }, 'back-button'),
99
93
  ];
100
94
  }
101
95
  return buttons;
102
- }, [
103
- handleBackClick,
104
- isFooterExpanded,
105
- isWalletListTypeView,
106
- setIsFooterExpanded,
107
- showBackButton,
108
- showHelpContent,
109
- ]);
96
+ }, [handleBackClick, showBackButton]);
110
97
  const closeButton = showCloseButton && handleClose && (jsx(IconButton, { onClick: handleClose, type: 'button', id: 'close-button', "data-testid": 'close-button', className: 'header__icon', children: jsx(SvgClose, {}) }));
98
+ const infoButton = showHelpContent && (jsx(Tooltip, { content: 'Need some help?', className: 'header__tooltip', children: jsx(IconButton, { type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon', children: isWalletListTypeView ? jsx(SvgQuestionMark, {}) : jsx(SvgFooterInfoIcon, {}) }) }, 'info-button'));
111
99
  const qrCodePreHeader = (jsxs("div", { className: 'qr-code-view__scan-issue-message', children: [jsx(Typography, { color: 'primary', variant: 'body_small', children: "If you're having issues scanning, click\u00A0" }), jsx("button", { className: 'qr-code-view__scan-issue-button', onClick: () => setShowQrCodeImage(true), children: "here" })] }));
112
- const positionAbsolute = view === 'login-with-email-verification';
113
- return (jsxs(Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsx(ModalHeader, { leading: leadingButtons, trailing: closeButton, positionAbsolute: positionAbsolute, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: !projectSettings ? (jsx(Skeleton, { className: 'header__skeleton' })) : (heading) }) })] }));
100
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { leading: leadingButtons, trailing: infoButton || closeButton, displayBorder: displayBorderBelowHeader, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: !projectSettings ? (jsx(Skeleton, { className: 'header__skeleton' })) : (heading) }) }), showQrCodePreHeader && qrCodePreHeader] }));
114
101
  };
115
102
 
116
103
  export { Header };