@dynamic-labs/sdk-react-core 0.18.0-RC.6 → 0.18.0-RC.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/index.cjs +6 -0
- package/src/index.js +3 -0
- package/src/lib/Main.cjs +2 -2
- package/src/lib/Main.js +2 -2
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +5 -3
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +6 -4
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.types.d.ts +1 -0
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -5
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +1 -9
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -4
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +11 -0
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +9 -0
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +7 -0
- package/src/lib/components/ModalHeader/ModalHeader.types.d.ts +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +26 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +26 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.d.ts +2 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +3 -1
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.cjs +6 -1
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +2 -1
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.js +6 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -3
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +0 -2
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -3
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.cjs +2 -1
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.js +2 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
- package/src/lib/components/Tooltip/Tooltip.js +1 -1
- package/src/lib/components/TosAndPp/TosAndPp.cjs +6 -5
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +3 -4
- package/src/lib/components/TosAndPp/TosAndPp.js +6 -5
- package/src/lib/components/Transition/transition.type.d.ts +3 -3
- package/src/lib/context/DynamicContext/DynamicContext.cjs +28 -18
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +4 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +29 -19
- package/src/lib/context/DynamicContext/helpers.cjs +1 -2
- package/src/lib/context/DynamicContext/helpers.js +1 -2
- package/src/lib/context/ErrorContext/ErrorContext.cjs +6 -0
- package/src/lib/context/ErrorContext/ErrorContext.js +6 -0
- package/src/lib/context/MockContext/MockContext.cjs +2 -14
- package/src/lib/context/MockContext/MockContext.js +2 -14
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +46 -0
- package/src/lib/context/WalletContext/WalletContext.d.ts +7 -0
- package/src/lib/context/WalletContext/WalletContext.js +41 -0
- package/src/lib/context/WalletContext/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +22 -63
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.d.ts +1 -6
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +23 -64
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +34 -15
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +35 -16
- package/src/lib/layout/DynamicAuthLayout/Header/header.types.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/EmptyFooterContent/empty-footer-content.cjs → HelpContent/EmptyHelpContent/EmptyHelpContent.cjs} +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/EmptyHelpContent.js +6 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/EmptyHelpContent/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +36 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +32 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +56 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +52 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.cjs → HelpContent/WalletListHelpContent/WalletListHelpContent.cjs} +3 -3
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.d.ts → HelpContent/WalletListHelpContent/WalletListHelpContent.d.ts} +1 -1
- package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent/WalletListFooterContent.js → HelpContent/WalletListHelpContent/WalletListHelpContent.js} +3 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -5
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +7 -0
- package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -5
- package/src/lib/layout/DynamicAuthLayout/HelpContent/index.d.ts +4 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +49 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.d.ts +2 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +45 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/index.d.ts +1 -0
- package/src/lib/shared/assets/chevron-left.cjs +5 -5
- package/src/lib/shared/assets/chevron-left.js +5 -5
- package/src/lib/shared/assets/close.cjs +5 -5
- package/src/lib/shared/assets/close.js +5 -5
- package/src/lib/shared/assets/footer-info-icon.cjs +2 -2
- package/src/lib/shared/assets/footer-info-icon.js +2 -2
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/question-mark.cjs +58 -0
- package/src/lib/shared/assets/question-mark.js +34 -0
- package/src/lib/shared/utils/hooks/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.cjs +31 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useMediaQuery/useMediaQuery.js +27 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +7 -27
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.d.ts +3 -4
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +8 -28
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +1 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +13 -0
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +13 -0
- package/src/lib/utils/hooks/index.d.ts +4 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +9 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +9 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +68 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +10 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +64 -0
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +16 -18
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +16 -18
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +20 -6
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +14 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +20 -6
- package/src/lib/utils/hooks/useCountdown/useCountdown.cjs +39 -0
- package/src/lib/utils/hooks/useCountdown/useCountdown.d.ts +11 -0
- package/src/lib/utils/hooks/useCountdown/useCountdown.js +35 -0
- package/src/lib/utils/hooks/useInterval/useInterval.d.ts +1 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.cjs +10 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +2 -0
- package/src/lib/utils/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +6 -0
- package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.cjs +6 -8
- package/src/lib/utils/hooks/useKeyboardEventListener/useKeyboardEventListener.js +7 -9
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +6 -28
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +0 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +7 -29
- package/src/lib/utils/hooks/useTimeout/useTimeout.cjs +27 -0
- package/src/lib/utils/hooks/useTimeout/useTimeout.d.ts +1 -0
- package/src/lib/utils/hooks/useTimeout/useTimeout.js +23 -0
- package/src/lib/utils/hooks/useTransition/useTransition.cjs +16 -24
- package/src/lib/utils/hooks/useTransition/useTransition.d.ts +3 -3
- package/src/lib/utils/hooks/useTransition/useTransition.js +17 -25
- package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.cjs +11 -9
- package/src/lib/utils/hooks/useTransitionEvents/useTransitionEvents.js +11 -9
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +4 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +4 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +1 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +1 -0
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +4 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -3
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +13 -23
- package/src/lib/views/EmailVerification/EmailVerification.js +14 -24
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +3 -0
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +3 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -1
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -1
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -3
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -3
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -3
- package/src/lib/views/QrCodeView/QRCode.cjs +36 -4
- package/src/lib/views/QrCodeView/QRCode.js +37 -5
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +1 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +5 -8
- package/src/lib/views/QrCodeView/QrCodeView.js +5 -8
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -4
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -4
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.cjs +15 -0
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +15 -0
- package/src/lib/views/WalletList/data.cjs +2 -1
- package/src/lib/views/WalletList/data.js +2 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +63 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.d.ts +2 -0
- package/src/lib/views/WalletLockedView/WalletLockedView.js +59 -0
- package/src/lib/views/WalletLockedView/index.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.cjs +23 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.d.ts +8 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeConnectButton/DynamicBridgeConnectButton.js +19 -0
- package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +0 -67
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.d.ts +0 -10
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +0 -63
- package/src/lib/layout/DynamicAuthLayout/Footer/index.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.d.ts +0 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/EmptyFooterContent/empty-footer-content.js +0 -6
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/index.d.ts +0 -1
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.d.ts +0 -8
- package/src/lib/layout/DynamicAuthLayout/FooterContent/index.d.ts +0 -3
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.cjs +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/Item.js +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/Item/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/NewToWeb3WalletItem.js +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/NewToWeb3WalletItem/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent/WalletListFooterContent → HelpContent/WalletListHelpContent}/WalletExtensionOrAppContinueButton/index.d.ts +0 -0
- /package/src/lib/layout/DynamicAuthLayout/{FooterContent → HelpContent}/WalletMoreInfoContent/index.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useCallback } from 'react';
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { Typography } from '../../../components/Typography/Typography.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../shared/logger.js';
|
|
@@ -8,6 +8,8 @@ import '@dynamic-labs/wallet-connector-core';
|
|
|
8
8
|
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
9
9
|
import { ReactComponent as SvgClose } from '../../../shared/assets/close.js';
|
|
10
10
|
import { ReactComponent as SvgChevronLeft } from '../../../shared/assets/chevron-left.js';
|
|
11
|
+
import { ReactComponent as SvgFooterInfoIcon } from '../../../shared/assets/footer-info-icon.js';
|
|
12
|
+
import { ReactComponent as SvgQuestionMark } from '../../../shared/assets/question-mark.js';
|
|
11
13
|
import '@dynamic-labs/wallet-book';
|
|
12
14
|
import '@dynamic-labs/utils';
|
|
13
15
|
import '../../../utils/constants/colors.js';
|
|
@@ -36,16 +38,21 @@ import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/Second
|
|
|
36
38
|
import '../../../context/MockContext/MockContext.js';
|
|
37
39
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
38
40
|
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
41
|
+
import { Tooltip } from '../../../components/Tooltip/Tooltip.js';
|
|
39
42
|
import '../../../components/Popper/Popper/Popper.js';
|
|
40
43
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
41
44
|
import 'formik';
|
|
42
45
|
import 'yup';
|
|
43
46
|
import { useQrCodeContext } from '../../../context/QrCodeContext/QrCodeContext.js';
|
|
47
|
+
import { useAuthLayoutChecks } from '../../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
|
|
48
|
+
import { useFooterAnimationContext } from '../../../context/FooterAnimationContext/index.js';
|
|
44
49
|
|
|
45
|
-
const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
|
|
50
|
+
const Header = ({ onClose: handleClose, heading, projectSettings, walletConnector, }) => {
|
|
46
51
|
const { clearStatesOnBackClick, selectedWalletConnector } = useInternalDynamicContext();
|
|
47
|
-
const {
|
|
52
|
+
const { setShowQrCodeImage } = useQrCodeContext();
|
|
53
|
+
const { isFooterExpanded, setIsFooterExpanded } = useFooterAnimationContext();
|
|
48
54
|
const { view, goToInitialView } = useViewContext();
|
|
55
|
+
const { showBackButton, showCloseButton, showQrCodePreHeader, showHelpContent, isWalletListTypeView, } = useAuthLayoutChecks(walletConnector);
|
|
49
56
|
const handleBackClick = useCallback(() => {
|
|
50
57
|
goToInitialView();
|
|
51
58
|
// on back button click in Coinbase wallet clearing state would kill connection and refresh the page
|
|
@@ -53,21 +60,33 @@ const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
|
|
|
53
60
|
clearStatesOnBackClick();
|
|
54
61
|
}
|
|
55
62
|
}, [clearStatesOnBackClick, selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name, goToInitialView]);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
const leadingButtons = useMemo(() => {
|
|
64
|
+
let buttons = [];
|
|
65
|
+
if (showBackButton) {
|
|
66
|
+
buttons = [
|
|
67
|
+
...buttons,
|
|
68
|
+
jsx(IconButton, Object.assign({ type: 'button', onClick: handleBackClick, "data-testid": 'back-button', className: 'header__icon' }, { children: jsx(SvgChevronLeft, {}) }), 'back-button'),
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
if (showHelpContent) {
|
|
72
|
+
buttons = [
|
|
73
|
+
...buttons,
|
|
74
|
+
jsx(Tooltip, Object.assign({ content: 'Need some help?', className: 'header__tooltip' }, { children: jsx(IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(!isFooterExpanded), "data-testid": 'info-button', className: 'header__icon' }, { children: isWalletListTypeView ? jsx(SvgQuestionMark, {}) : jsx(SvgFooterInfoIcon, {}) })) }), 'info-button'),
|
|
75
|
+
];
|
|
76
|
+
}
|
|
77
|
+
return buttons;
|
|
78
|
+
}, [
|
|
79
|
+
handleBackClick,
|
|
80
|
+
isFooterExpanded,
|
|
81
|
+
isWalletListTypeView,
|
|
82
|
+
setIsFooterExpanded,
|
|
83
|
+
showBackButton,
|
|
84
|
+
showHelpContent,
|
|
85
|
+
]);
|
|
67
86
|
const closeButton = showCloseButton && (jsx(IconButton, Object.assign({ onClick: handleClose, type: 'button', id: 'close-button', "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
|
|
68
87
|
const qrCodePreHeader = (jsxs("div", Object.assign({ className: 'qr-code-view__scan-issue-message' }, { children: [jsx(Typography, Object.assign({ color: 'primary', variant: 'body_small' }, { children: "If you're having issues scanning, click\u00A0" })), jsx("button", Object.assign({ className: 'qr-code-view__scan-issue-button', onClick: () => setShowQrCodeImage(true) }, { children: "here" }))] })));
|
|
69
|
-
const
|
|
70
|
-
return (jsxs(Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsx(ModalHeader, Object.assign({ leading:
|
|
88
|
+
const positionAbsolute = view === 'login-with-email-verification';
|
|
89
|
+
return (jsxs(Fragment, { children: [showQrCodePreHeader && qrCodePreHeader, jsx(ModalHeader, Object.assign({ leading: leadingButtons, trailing: closeButton, positionAbsolute: positionAbsolute }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography' }, { children: !projectSettings ? (jsx(Skeleton, { className: 'header__skeleton' })) : (heading) })) }))] }));
|
|
71
90
|
};
|
|
72
91
|
|
|
73
92
|
export { Header };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ProjectSettings } from '@dynamic-labs/sdk-api';
|
|
3
|
+
import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
3
4
|
import { ModalProps } from '../../../shared/types';
|
|
4
5
|
export type WalletHeaderProps = ModalProps & {
|
|
5
6
|
heading: string | JSX.Element;
|
|
6
7
|
projectSettings?: ProjectSettings;
|
|
8
|
+
walletConnector?: WalletConnector | null;
|
|
7
9
|
};
|
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
7
|
/* istanbul ignore next */
|
|
8
|
-
const
|
|
8
|
+
const EmptyHelpContent = () => jsxRuntime.jsx("div", { "data-testid": 'empty-help-content' });
|
|
9
9
|
|
|
10
|
-
exports.
|
|
10
|
+
exports.EmptyHelpContent = EmptyHelpContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmptyHelpContent } from './EmptyHelpContent';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
8
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
|
+
var WalletListHelpContent = require('./WalletListHelpContent/WalletListHelpContent.cjs');
|
|
10
|
+
var WalletMoreInfoContent = require('./WalletMoreInfoContent/WalletMoreInfoContent.cjs');
|
|
11
|
+
var EmptyHelpContent = require('./EmptyHelpContent/EmptyHelpContent.cjs');
|
|
12
|
+
var HelpHeader = require('./HelpHeader/HelpHeader.cjs');
|
|
13
|
+
|
|
14
|
+
const HelpContent = () => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(HelpHeader.HelpHeader, {}), jsxRuntime.jsx(HelpContentSwitch, {})] }));
|
|
15
|
+
const HelpContentSwitch = () => {
|
|
16
|
+
const { view } = ViewContext.useViewContext();
|
|
17
|
+
const { projectSettings, newToWeb3WalletChainMap, selectedWalletConnector } = useInternalDynamicContext.useInternalDynamicContext();
|
|
18
|
+
const isWalletListTypeView = React.useMemo(() => view === 'wallet-connect-mobile-wallets-list' ||
|
|
19
|
+
view === 'wallet-list' ||
|
|
20
|
+
view === 'login-with-email-or-wallet-full-wallet-list', [view]);
|
|
21
|
+
const isPendingSignatureTypeView = React.useMemo(() => view === 'pending-signature-without-back-button' ||
|
|
22
|
+
view === 'pending-signature', [view]);
|
|
23
|
+
const isPendingConnectTypeView = React.useMemo(() => view === 'pending-connect' || view === 'qr-code', [view]);
|
|
24
|
+
if (isWalletListTypeView) {
|
|
25
|
+
return (jsxRuntime.jsx(WalletListHelpContent.WalletListHelpContent, { chains: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.chains, newToWeb3WalletChainMap: newToWeb3WalletChainMap }));
|
|
26
|
+
}
|
|
27
|
+
if (isPendingSignatureTypeView) {
|
|
28
|
+
return (jsxRuntime.jsx(WalletMoreInfoContent.WalletMoreInfoContent, { variant: 'sign', walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name }));
|
|
29
|
+
}
|
|
30
|
+
if (isPendingConnectTypeView) {
|
|
31
|
+
return jsxRuntime.jsx(WalletMoreInfoContent.WalletMoreInfoContent, { variant: 'connect' });
|
|
32
|
+
}
|
|
33
|
+
return jsxRuntime.jsx(EmptyHelpContent.EmptyHelpContent, {});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.HelpContent = HelpContent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
|
|
4
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
|
+
import { WalletListHelpContent } from './WalletListHelpContent/WalletListHelpContent.js';
|
|
6
|
+
import { WalletMoreInfoContent } from './WalletMoreInfoContent/WalletMoreInfoContent.js';
|
|
7
|
+
import { EmptyHelpContent } from './EmptyHelpContent/EmptyHelpContent.js';
|
|
8
|
+
import { HelpHeader } from './HelpHeader/HelpHeader.js';
|
|
9
|
+
|
|
10
|
+
const HelpContent = () => (jsxs("div", { children: [jsx(HelpHeader, {}), jsx(HelpContentSwitch, {})] }));
|
|
11
|
+
const HelpContentSwitch = () => {
|
|
12
|
+
const { view } = useViewContext();
|
|
13
|
+
const { projectSettings, newToWeb3WalletChainMap, selectedWalletConnector } = useInternalDynamicContext();
|
|
14
|
+
const isWalletListTypeView = useMemo(() => view === 'wallet-connect-mobile-wallets-list' ||
|
|
15
|
+
view === 'wallet-list' ||
|
|
16
|
+
view === 'login-with-email-or-wallet-full-wallet-list', [view]);
|
|
17
|
+
const isPendingSignatureTypeView = useMemo(() => view === 'pending-signature-without-back-button' ||
|
|
18
|
+
view === 'pending-signature', [view]);
|
|
19
|
+
const isPendingConnectTypeView = useMemo(() => view === 'pending-connect' || view === 'qr-code', [view]);
|
|
20
|
+
if (isWalletListTypeView) {
|
|
21
|
+
return (jsx(WalletListHelpContent, { chains: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.chains, newToWeb3WalletChainMap: newToWeb3WalletChainMap }));
|
|
22
|
+
}
|
|
23
|
+
if (isPendingSignatureTypeView) {
|
|
24
|
+
return (jsx(WalletMoreInfoContent, { variant: 'sign', walletName: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name }));
|
|
25
|
+
}
|
|
26
|
+
if (isPendingConnectTypeView) {
|
|
27
|
+
return jsx(WalletMoreInfoContent, { variant: 'connect' });
|
|
28
|
+
}
|
|
29
|
+
return jsx(EmptyHelpContent, {});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { HelpContent };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
8
|
+
require('@dynamic-labs/sdk-api');
|
|
9
|
+
require('../../../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
var chevronLeft = require('../../../../shared/assets/chevron-left.cjs');
|
|
14
|
+
require('@dynamic-labs/wallet-book');
|
|
15
|
+
require('@dynamic-labs/utils');
|
|
16
|
+
require('../../../../utils/constants/colors.cjs');
|
|
17
|
+
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
18
|
+
require('ethers');
|
|
19
|
+
require('../../../../shared/consts/index.cjs');
|
|
20
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
21
|
+
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
|
+
require('react-dom');
|
|
25
|
+
require('react-focus-lock');
|
|
26
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
30
|
+
require('@dynamic-labs/rpc-providers');
|
|
31
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
|
+
var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
|
|
34
|
+
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
35
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
36
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
37
|
+
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
38
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
39
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
40
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
41
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
42
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
|
+
require('formik');
|
|
44
|
+
require('yup');
|
|
45
|
+
var index = require('../../../../context/FooterAnimationContext/index.cjs');
|
|
46
|
+
var getDynamicLayoutData = require('../../../../utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs');
|
|
47
|
+
|
|
48
|
+
const HelpHeader = () => {
|
|
49
|
+
const { setIsFooterExpanded } = index.useFooterAnimationContext();
|
|
50
|
+
const { view } = ViewContext.useViewContext();
|
|
51
|
+
const { helpHeaderData } = getDynamicLayoutData.getDynamicLayoutData({ view });
|
|
52
|
+
const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'back-button ' }) })));
|
|
53
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: 'help-header' }, { children: jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: backButton }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.HelpHeader = HelpHeader;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
4
|
+
import '@dynamic-labs/sdk-api';
|
|
5
|
+
import '../../../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import { ReactComponent as SvgChevronLeft } from '../../../../shared/assets/chevron-left.js';
|
|
10
|
+
import '@dynamic-labs/wallet-book';
|
|
11
|
+
import '@dynamic-labs/utils';
|
|
12
|
+
import '../../../../utils/constants/colors.js';
|
|
13
|
+
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
14
|
+
import 'ethers';
|
|
15
|
+
import '../../../../shared/consts/index.js';
|
|
16
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
17
|
+
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
20
|
+
import 'react-dom';
|
|
21
|
+
import 'react-focus-lock';
|
|
22
|
+
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
|
+
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
|
+
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
+
import '../../../../config/ApiEndpoint.js';
|
|
26
|
+
import '@dynamic-labs/rpc-providers';
|
|
27
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
28
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
|
+
import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
|
|
30
|
+
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
31
|
+
import '../../../../components/Alert/Alert.js';
|
|
32
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
33
|
+
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
34
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
35
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
36
|
+
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
37
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
38
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
39
|
+
import 'formik';
|
|
40
|
+
import 'yup';
|
|
41
|
+
import { useFooterAnimationContext } from '../../../../context/FooterAnimationContext/index.js';
|
|
42
|
+
import { getDynamicLayoutData } from '../../../../utils/functions/getDynamicLayoutData/getDynamicLayoutData.js';
|
|
43
|
+
|
|
44
|
+
const HelpHeader = () => {
|
|
45
|
+
const { setIsFooterExpanded } = useFooterAnimationContext();
|
|
46
|
+
const { view } = useViewContext();
|
|
47
|
+
const { helpHeaderData } = getDynamicLayoutData({ view });
|
|
48
|
+
const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: () => setIsFooterExpanded(false), "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, { className: 'back-button ' }) })));
|
|
49
|
+
return (jsx("div", Object.assign({ className: 'help-header' }, { children: jsx(ModalHeader, Object.assign({ trailing: backButton }, { children: jsx(Typography, Object.assign({ as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-help-heading', className: 'header__typography' }, { children: helpHeaderData === null || helpHeaderData === void 0 ? void 0 : helpHeaderData.heading })) })) })));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { HelpHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HelpHeader } from './HelpHeader';
|
|
@@ -50,7 +50,7 @@ var NewToWeb3WalletItem = require('./NewToWeb3WalletItem/NewToWeb3WalletItem.cjs
|
|
|
50
50
|
var Item = require('./Item/Item.cjs');
|
|
51
51
|
var WalletExtensionOrAppContinueButton = require('./WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs');
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
54
54
|
var _a, _b;
|
|
55
55
|
const { wallets } = useInternalDynamicContext.useInternalDynamicContext();
|
|
56
56
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
@@ -84,7 +84,7 @@ const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
|
84
84
|
if (!Object.keys((_b = walletBook$1 === null || walletBook$1 === void 0 ? void 0 : walletBook$1.wallets) !== null && _b !== void 0 ? _b : {}).length) {
|
|
85
85
|
return jsxRuntime.jsx(Skeleton.Skeleton, { className: 'walletlist-footer-content__container' });
|
|
86
86
|
}
|
|
87
|
-
return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-
|
|
87
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxRuntime.jsxs(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletName: walletName, style: { height: pixelToRem.pixelToRem(56), width: pixelToRem.pixelToRem(56) } }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', walletBook.getWalletBookWallet(walletBook$1, walletName).name] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsxRuntime.jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsxRuntime.jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsxRuntime.jsx(Item.Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxRuntime.jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsxRuntime.jsx(NewToWeb3WalletItem.NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsxRuntime.jsx(WalletExtensionOrAppContinueButton.WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
exports.
|
|
90
|
+
exports.WalletListHelpContent = WalletListHelpContent;
|
|
@@ -5,5 +5,5 @@ interface Props {
|
|
|
5
5
|
chains: ProjectSettingsChains[] | undefined;
|
|
6
6
|
newToWeb3WalletChainMap: ChainToWalletMap;
|
|
7
7
|
}
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const WalletListHelpContent: ({ chains, newToWeb3WalletChainMap, }: Props) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -46,7 +46,7 @@ import { NewToWeb3WalletItem } from './NewToWeb3WalletItem/NewToWeb3WalletItem.j
|
|
|
46
46
|
import { Item } from './Item/Item.js';
|
|
47
47
|
import { WalletExtensionOrAppContinueButton } from './WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js';
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const WalletListHelpContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
50
50
|
var _a, _b;
|
|
51
51
|
const { wallets } = useInternalDynamicContext();
|
|
52
52
|
const { walletBook } = useWalletBookContext();
|
|
@@ -80,7 +80,7 @@ const WalletListFooterContent = ({ chains, newToWeb3WalletChainMap, }) => {
|
|
|
80
80
|
if (!Object.keys((_b = walletBook === null || walletBook === void 0 ? void 0 : walletBook.wallets) !== null && _b !== void 0 ? _b : {}).length) {
|
|
81
81
|
return jsx(Skeleton, { className: 'walletlist-footer-content__container' });
|
|
82
82
|
}
|
|
83
|
-
return (jsx("div", Object.assign({ className: 'walletlist-
|
|
83
|
+
return (jsx("div", Object.assign({ className: 'walletlist-help-content__container' }, { children: jsxs(EnterTileAnimation, Object.assign({ delay: '300ms' }, { children: [jsx("div", Object.assign({ className: 'walletlist-help-content__icon' }, { children: jsx(WalletIcon, { walletName: walletName, style: { height: pixelToRem(56), width: pixelToRem(56) } }) })), jsxs("div", Object.assign({ className: 'walletlist-help-content__typography-wrapper' }, { children: [jsxs(Typography, Object.assign({ as: 'p', variant: 'title', weight: 'medium' }, { children: ["We recommend installing", ' ', getWalletBookWallet(walletBook, walletName).name] })), jsx(Typography, Object.assign({ as: 'label', variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'walletlist-help-content__typography--label' }, { children: "Select your preferred option below:" }))] })), jsx("div", Object.assign({ className: 'walletlist-help-content__buttons-wrapper' }, { children: walletLinksElements.map((element, i) => element.isEnabled ? (jsx("button", Object.assign({ onClick: () => setSelectedUrl(element.url) }, { children: jsx(Item, { StartIcon: element.icon, heading: element.content, url: element.url }) }), i)) : undefined) })), isCustodialServiceWallet && (jsxs("div", Object.assign({ className: 'walletlist-help-content__custodial-wallet-area' }, { children: [jsx(Typography, Object.assign({ className: 'walletlist-help-content__custodial-wallet-area--title', as: 'p', color: 'secondary', variant: 'body_normal', weight: 'regular' }, { children: "If you don't want to install a wallet, then use:" })), jsx(NewToWeb3WalletItem, { wallet: newToWeb3Wallet })] }))), jsx(WalletExtensionOrAppContinueButton, { selectedUrl: selectedUrl, wallet: newToWeb3Wallet })] })) })));
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
export {
|
|
86
|
+
export { WalletListHelpContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletListHelpContent } from './WalletListHelpContent';
|
|
@@ -47,7 +47,7 @@ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
47
47
|
require('formik');
|
|
48
48
|
require('yup');
|
|
49
49
|
|
|
50
|
-
const WalletMoreInfoContent = ({
|
|
50
|
+
const WalletMoreInfoContent = ({ variant, walletName, }) => {
|
|
51
51
|
const defaultSignContent = {
|
|
52
52
|
info: [
|
|
53
53
|
{
|
|
@@ -72,9 +72,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
|
72
72
|
{
|
|
73
73
|
content: (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__item--phantom-ledger' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Ledger does not support message signing functionality, commonly used to log in to sites. Instead, we sign a transaction as a proxy to prove ownership of the wallet." })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: [jsxRuntime.jsx("strong", { children: "Important" }), ": we do not", ' ', jsxRuntime.jsx("strong", { children: "broadcast" }), " this transaction, meaning Ledger based login will still be gasless."] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Phantom in turn shows that a fee may apply as part of the \u201Ctransaction\u201D." })), jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "As always, please be cautious of the extensions and websites you use to prevent unwanted transactions from being broadcasted to the network." }))] }))),
|
|
74
74
|
icon: footerGasIcon.ReactComponent,
|
|
75
|
-
title:
|
|
76
|
-
? 'Why do I see a fee when using ledger'
|
|
77
|
-
: 'There are no associated gas costs',
|
|
75
|
+
title: 'Why do I see a fee when using ledger',
|
|
78
76
|
},
|
|
79
77
|
],
|
|
80
78
|
}
|
|
@@ -95,7 +93,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
|
95
93
|
},
|
|
96
94
|
sign: signInfoMessage,
|
|
97
95
|
};
|
|
98
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsxRuntime.jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsxRuntime.jsx(InfoItem.InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { align: '
|
|
96
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsxRuntime.jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsxRuntime.jsx(InfoItem.InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsxRuntime.jsx(EnterTileAnimation.EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { align: 'center' }) }))] })));
|
|
99
97
|
};
|
|
100
98
|
|
|
101
99
|
exports.WalletMoreInfoContent = WalletMoreInfoContent;
|
|
@@ -43,7 +43,7 @@ import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
|
43
43
|
import 'formik';
|
|
44
44
|
import 'yup';
|
|
45
45
|
|
|
46
|
-
const WalletMoreInfoContent = ({
|
|
46
|
+
const WalletMoreInfoContent = ({ variant, walletName, }) => {
|
|
47
47
|
const defaultSignContent = {
|
|
48
48
|
info: [
|
|
49
49
|
{
|
|
@@ -68,9 +68,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
|
68
68
|
{
|
|
69
69
|
content: (jsxs("div", Object.assign({ className: 'footer-more-info-content__item--phantom-ledger' }, { children: [jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Ledger does not support message signing functionality, commonly used to log in to sites. Instead, we sign a transaction as a proxy to prove ownership of the wallet." })), jsxs(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: [jsx("strong", { children: "Important" }), ": we do not", ' ', jsx("strong", { children: "broadcast" }), " this transaction, meaning Ledger based login will still be gasless."] })), jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "Phantom in turn shows that a fee may apply as part of the \u201Ctransaction\u201D." })), jsx(Typography, Object.assign({ as: 'p', variant: 'body_small', weight: 'regular' }, { children: "As always, please be cautious of the extensions and websites you use to prevent unwanted transactions from being broadcasted to the network." }))] }))),
|
|
70
70
|
icon: SvgFooterGasIcon,
|
|
71
|
-
title:
|
|
72
|
-
? 'Why do I see a fee when using ledger'
|
|
73
|
-
: 'There are no associated gas costs',
|
|
71
|
+
title: 'Why do I see a fee when using ledger',
|
|
74
72
|
},
|
|
75
73
|
],
|
|
76
74
|
}
|
|
@@ -91,7 +89,7 @@ const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
|
91
89
|
},
|
|
92
90
|
sign: signInfoMessage,
|
|
93
91
|
};
|
|
94
|
-
return (jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsx(InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsx(PoweredByDynamic, { align: '
|
|
92
|
+
return (jsxs("div", Object.assign({ className: 'footer-more-info-content__wrapper' }, { children: [copys[variant].info.map((item, index) => (jsx("div", Object.assign({ className: 'footer-more-info-content__item' }, { children: jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + index * 0.2}s` }, { children: jsx(InfoItem, { Icon: item.icon, title: item.title, content: item.content }) })) }), index))), jsx(EnterTileAnimation, Object.assign({ delay: `${0.3 + copys[variant].info.length * 0.2}s` }, { children: jsx(PoweredByDynamic, { align: 'center' }) }))] })));
|
|
95
93
|
};
|
|
96
94
|
|
|
97
95
|
export { WalletMoreInfoContent };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
require('react');
|
|
7
|
+
require('@dynamic-labs/sdk-api');
|
|
8
|
+
require('../../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('@dynamic-labs/wallet-book');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
require('../../../utils/constants/colors.cjs');
|
|
15
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
|
+
require('ethers');
|
|
17
|
+
require('../../../shared/consts/index.cjs');
|
|
18
|
+
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
20
|
+
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
21
|
+
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
22
|
+
require('react-dom');
|
|
23
|
+
require('react-focus-lock');
|
|
24
|
+
require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
25
|
+
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
26
|
+
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
27
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
28
|
+
require('@dynamic-labs/rpc-providers');
|
|
29
|
+
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
30
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
31
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
32
|
+
require('../../../components/Alert/Alert.cjs');
|
|
33
|
+
require('../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
34
|
+
require('../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
35
|
+
require('../../../context/MockContext/MockContext.cjs');
|
|
36
|
+
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
37
|
+
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
38
|
+
var TosAndPp = require('../../../components/TosAndPp/TosAndPp.cjs');
|
|
39
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
|
+
require('formik');
|
|
42
|
+
require('yup');
|
|
43
|
+
|
|
44
|
+
const ToSFooter = () => {
|
|
45
|
+
const { privacyPolicyUrl, termsOfServiceUrl } = useInternalDynamicContext.useInternalDynamicContext();
|
|
46
|
+
return (jsxRuntime.jsx("div", Object.assign({ className: 'tos-and-pp__footer' }, { children: termsOfServiceUrl && privacyPolicyUrl && (jsxRuntime.jsx(TosAndPp.TosAndPp, { privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })) })));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.ToSFooter = ToSFooter;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@dynamic-labs/sdk-api';
|
|
4
|
+
import '../../../shared/logger.js';
|
|
5
|
+
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
8
|
+
import '@dynamic-labs/wallet-book';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
|
+
import '../../../utils/constants/colors.js';
|
|
11
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
12
|
+
import 'ethers';
|
|
13
|
+
import '../../../shared/consts/index.js';
|
|
14
|
+
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
15
|
+
import '@dynamic-labs/multi-wallet';
|
|
16
|
+
import '../../../components/ShadowDOM/ShadowDOM.js';
|
|
17
|
+
import '../../../context/ThemeContext/ThemeContext.js';
|
|
18
|
+
import 'react-dom';
|
|
19
|
+
import 'react-focus-lock';
|
|
20
|
+
import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
21
|
+
import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
22
|
+
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
23
|
+
import '../../../config/ApiEndpoint.js';
|
|
24
|
+
import '@dynamic-labs/rpc-providers';
|
|
25
|
+
import '../../../context/ErrorContext/ErrorContext.js';
|
|
26
|
+
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
27
|
+
import '../../../components/IconButton/IconButton.js';
|
|
28
|
+
import '../../../components/Alert/Alert.js';
|
|
29
|
+
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
30
|
+
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
31
|
+
import '../../../context/MockContext/MockContext.js';
|
|
32
|
+
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
33
|
+
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
34
|
+
import { TosAndPp } from '../../../components/TosAndPp/TosAndPp.js';
|
|
35
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
36
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
|
+
import 'formik';
|
|
38
|
+
import 'yup';
|
|
39
|
+
|
|
40
|
+
const ToSFooter = () => {
|
|
41
|
+
const { privacyPolicyUrl, termsOfServiceUrl } = useInternalDynamicContext();
|
|
42
|
+
return (jsx("div", Object.assign({ className: 'tos-and-pp__footer' }, { children: termsOfServiceUrl && privacyPolicyUrl && (jsx(TosAndPp, { privacyPolicyUrl: privacyPolicyUrl, termsOfServiceUrl: termsOfServiceUrl })) })));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { ToSFooter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToSFooter } from './ToSFooter';
|
|
@@ -34,9 +34,9 @@ var SvgChevronLeft = function SvgChevronLeft(_ref) {
|
|
|
34
34
|
titleId = _ref.titleId,
|
|
35
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
36
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
39
|
-
viewBox: "0 0
|
|
37
|
+
width: 20,
|
|
38
|
+
height: 20,
|
|
39
|
+
viewBox: "0 0 20 20",
|
|
40
40
|
fill: "none",
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
"aria-labelledby": titleId
|
|
@@ -45,8 +45,8 @@ var SvgChevronLeft = function SvgChevronLeft(_ref) {
|
|
|
45
45
|
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
46
46
|
fillRule: "evenodd",
|
|
47
47
|
clipRule: "evenodd",
|
|
48
|
-
d: "
|
|
49
|
-
fill: "
|
|
48
|
+
d: "M13.09 3.577a.833.833 0 0 1 0 1.179L7.844 10l5.244 5.244a.833.833 0 0 1-1.178 1.179l-5.834-5.834a.833.833 0 0 1 0-1.178l5.834-5.834a.833.833 0 0 1 1.178 0Z",
|
|
49
|
+
fill: "currentcolor"
|
|
50
50
|
})));
|
|
51
51
|
};
|
|
52
52
|
|