@dynamic-labs/sdk-react-core 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +13 -13
- package/src/lib/components/Alert/Alert.types.d.ts +2 -1
- package/src/lib/components/Button/Button.cjs +2 -2
- package/src/lib/components/Button/Button.d.ts +2 -1
- package/src/lib/components/Button/Button.js +2 -2
- package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.d.ts +3 -2
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -2
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.d.ts +2 -1
- package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +2 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
- package/src/lib/components/Input/Input.types.d.ts +2 -1
- package/src/lib/components/ListTile/ListTile.cjs +1 -1
- package/src/lib/components/ListTile/ListTile.js +1 -1
- package/src/lib/components/ListTile/ListTile.types.d.ts +2 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +9 -5
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +1 -1
- package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +9 -5
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -3
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -3
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +7 -6
- package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +7 -6
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
- package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
- package/src/lib/components/Search/Search.cjs +1 -1
- package/src/lib/components/Search/Search.d.ts +2 -1
- package/src/lib/components/Search/Search.js +1 -1
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +2 -2
- package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +2 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +3 -3
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +3 -3
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +1 -1
- package/src/lib/components/TextButton/TextButton.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -2
- package/src/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/src/lib/components/Tooltip/Tooltip.js +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -3
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +2 -1
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/Typography/Typography.types.d.ts +2 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.d.ts +1 -0
- package/src/lib/components/UserProfile/UserProfile.js +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -2
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
- package/src/lib/data/api.cjs +0 -13
- package/src/lib/data/api.d.ts +1 -2
- package/src/lib/data/api.js +1 -13
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.d.ts +2 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -2
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +2 -2
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +2 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +2 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +2 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +2 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +2 -2
- package/src/lib/locale/en/translation.cjs +124 -1
- package/src/lib/locale/en/translation.d.ts +124 -1
- package/src/lib/locale/en/translation.js +124 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +1 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -1
- package/src/lib/shared/types/index.d.ts +3 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +16 -9
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +16 -9
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +28 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +28 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +2 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.d.ts +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +2 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +2 -4
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +2 -4
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +51 -7
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +51 -7
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +3 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +3 -0
- package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
- package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +20 -14
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +20 -14
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +26 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +26 -4
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +2 -2
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
- package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -4
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +9 -8
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +9 -8
- package/src/lib/views/CollectUserDataView/useFields.cjs +11 -0
- package/src/lib/views/CollectUserDataView/useFields.d.ts +11 -0
- package/src/lib/views/CollectUserDataView/useFields.js +11 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +3 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +3 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -2
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -2
- package/src/lib/views/EmailVerification/EmailVerification.cjs +35 -24
- package/src/lib/views/EmailVerification/EmailVerification.js +35 -24
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -3
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.d.ts +3 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +2 -2
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +3 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +3 -1
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +3 -3
- package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +3 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
- package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
- package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +2 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +8 -6
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +2 -1
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +8 -6
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +6 -9
- package/src/lib/views/WalletList/WalletList.js +6 -9
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +5 -3
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +65 -21
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +66 -22
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +1 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
- /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
|
@@ -64,7 +64,7 @@ const SocialRedirectView = () => {
|
|
|
64
64
|
const { socialProvider, signInProvider } = useSocialRedirectContext();
|
|
65
65
|
const findSocialIcon = useFindSocialIcon();
|
|
66
66
|
const { t } = useTranslation();
|
|
67
|
-
return (jsxs("div", { className: classNames('social-redirect-view__container'), children: [socialProvider && (jsx(IconWithSpinner, { iconSize: 64, Icon: findSocialIcon(socialProvider), isSpinning: true })), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-redirect-view__title'), children: t('dyn_social_redirect.logging_in') }), signInProvider !== SignInProviderEnum.MagicLink && (jsx(PoweredByDynamic, { classNameRoot: 'powered-by-dynamic' }))] }));
|
|
67
|
+
return (jsxs("div", { className: classNames('social-redirect-view__container'), children: [socialProvider && (jsx(IconWithSpinner, { iconSize: 64, Icon: findSocialIcon(socialProvider), isSpinning: true })), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-redirect-view__title'), copykey: 'dyn_social_redirect.logging_in', children: t('dyn_social_redirect.logging_in') }), signInProvider !== SignInProviderEnum.MagicLink && (jsx(PoweredByDynamic, { classNameRoot: 'powered-by-dynamic' }))] }));
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export { SocialRedirectView };
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
7
8
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
9
10
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -29,7 +30,6 @@ var useFindSocialIcon = require('../../utils/hooks/useFindSocialIcon/useFindSoci
|
|
|
29
30
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
30
31
|
require('@dynamic-labs/types');
|
|
31
32
|
require('yup');
|
|
32
|
-
require('react-i18next');
|
|
33
33
|
require('../../context/MockContext/MockContext.cjs');
|
|
34
34
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
35
35
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -67,16 +67,17 @@ var SocialRedirectContext = require('../../context/SocialRedirectContext/SocialR
|
|
|
67
67
|
const SocialWrongAccountView = () => {
|
|
68
68
|
const [tryAgainClicked, setTryAgainClicked] = React.useState(false);
|
|
69
69
|
const { socialWalletConnector, socialAccount } = SocialRedirectContext.useSocialRedirectContext();
|
|
70
|
+
const { t } = reactI18next.useTranslation();
|
|
70
71
|
const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
|
|
71
72
|
if (!socialAccount || !socialWalletConnector)
|
|
72
73
|
return null;
|
|
73
|
-
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'),
|
|
74
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'), copykey: 'dyn_login.wrong_social_account.title', children: t('dyn_login.wrong_social_account.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.subtitle', children: t('dyn_login.wrong_social_account.subtitle') }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.retry_title', children: [t('dyn_login.wrong_social_account.retry_title'), jsxRuntime.jsx("b", { children: socialAccount.oauthUsername })] }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
74
75
|
variant: 'button_primary',
|
|
75
76
|
weight: 'medium',
|
|
76
77
|
}, disabled: tryAgainClicked, onClick: () => {
|
|
77
78
|
setTryAgainClicked(true);
|
|
78
79
|
socialWalletConnector.connect(socialAccount.oauthProvider);
|
|
79
|
-
}, children:
|
|
80
|
+
}, copykey: 'dyn_login.wrong_social_account.retry_button', children: t('dyn_login.wrong_social_account.retry_button') })] }));
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
exports.SocialWrongAccountView = SocialWrongAccountView;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
5
6
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
@@ -25,7 +26,6 @@ import { useFindSocialIcon } from '../../utils/hooks/useFindSocialIcon/useFindSo
|
|
|
25
26
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
26
27
|
import '@dynamic-labs/types';
|
|
27
28
|
import 'yup';
|
|
28
|
-
import 'react-i18next';
|
|
29
29
|
import '../../context/MockContext/MockContext.js';
|
|
30
30
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
31
31
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -63,16 +63,17 @@ import { useSocialRedirectContext } from '../../context/SocialRedirectContext/So
|
|
|
63
63
|
const SocialWrongAccountView = () => {
|
|
64
64
|
const [tryAgainClicked, setTryAgainClicked] = useState(false);
|
|
65
65
|
const { socialWalletConnector, socialAccount } = useSocialRedirectContext();
|
|
66
|
+
const { t } = useTranslation();
|
|
66
67
|
const findSocialIcon = useFindSocialIcon();
|
|
67
68
|
if (!socialAccount || !socialWalletConnector)
|
|
68
69
|
return null;
|
|
69
|
-
return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'),
|
|
70
|
+
return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'), copykey: 'dyn_login.wrong_social_account.title', children: t('dyn_login.wrong_social_account.title') }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.subtitle', children: t('dyn_login.wrong_social_account.subtitle') }), jsxs(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.retry_title', children: [t('dyn_login.wrong_social_account.retry_title'), jsx("b", { children: socialAccount.oauthUsername })] }), jsx(Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
70
71
|
variant: 'button_primary',
|
|
71
72
|
weight: 'medium',
|
|
72
73
|
}, disabled: tryAgainClicked, onClick: () => {
|
|
73
74
|
setTryAgainClicked(true);
|
|
74
75
|
socialWalletConnector.connect(socialAccount.oauthProvider);
|
|
75
|
-
}, children:
|
|
76
|
+
}, copykey: 'dyn_login.wrong_social_account.retry_button', children: t('dyn_login.wrong_social_account.retry_button') })] }));
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
export { SocialWrongAccountView };
|
|
@@ -72,7 +72,7 @@ var useTransactionTotal = require('./hooks/useTransactionTotal/useTransactionTot
|
|
|
72
72
|
var transactionErrorMessage = require('./helpers/transactionErrorMessage.cjs');
|
|
73
73
|
require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
74
74
|
|
|
75
|
-
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, }) => {
|
|
75
|
+
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, copykey, }) => {
|
|
76
76
|
const { appName, appLogoUrl, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
77
77
|
const appOrigin = getAppOrigin.getAppOrigin();
|
|
78
78
|
const [isGasSponsored, setIsGasSponsored] = React.useState(false);
|
|
@@ -154,13 +154,13 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
154
154
|
if (isTransactionLoading || Boolean(errorMessage))
|
|
155
155
|
return null;
|
|
156
156
|
if (utils.TransactionGasCannotBeSponsoredError.isInstance(transactionError)) {
|
|
157
|
-
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: t('dyn_send_transaction.error_message.gas_not_sponsored') }));
|
|
157
|
+
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', copykey: 'dyn_send_transaction.error_message.gas_not_sponsored', children: t('dyn_send_transaction.error_message.gas_not_sponsored') }));
|
|
158
158
|
}
|
|
159
159
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
160
160
|
if (!showInsufficientFundsWarningMessage)
|
|
161
161
|
return;
|
|
162
162
|
const amountLeft = formatBigNumber.formatBigNumber(missingFunds, 5);
|
|
163
|
-
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
163
|
+
return (jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
164
164
|
amountLeft,
|
|
165
165
|
currencySymbol,
|
|
166
166
|
}) }));
|
|
@@ -173,12 +173,14 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
173
173
|
isTransactionLoading,
|
|
174
174
|
errorMessage,
|
|
175
175
|
]);
|
|
176
|
-
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading || hasInsufficientFunds, error: errorMessage, alert: alert, children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress.shortenWalletAddress(transactionFromAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
177
|
-
shortenWalletAddress.shortenWalletAddress(transactionToAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue ? formatBigNumber.formatBigNumber(transactionValue) : undefined, suffix: currencySymbol, icon: chainIcon, dataTestId: 'transaction-amount', children: transactionValue ? formatBigNumber.formatBigNumber(transactionValue, 10) : 0 }), !isGasSponsored && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TransactionRow.TransactionRow, {
|
|
176
|
+
return (jsxRuntime.jsxs(TransactionConfirmationPageLayout.TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading || hasInsufficientFunds, error: errorMessage, alert: alert, children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.from', label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress.shortenWalletAddress(transactionFromAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.to', label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
177
|
+
shortenWalletAddress.shortenWalletAddress(transactionToAddress, 4, 4) }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue ? formatBigNumber.formatBigNumber(transactionValue) : undefined, suffix: currencySymbol, icon: chainIcon, dataTestId: 'transaction-amount', children: transactionValue ? formatBigNumber.formatBigNumber(transactionValue, 10) : 0 }), !isGasSponsored && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: isGasEstimated
|
|
178
|
+
? 'dyn_send_transaction.confirmation.data.gas_estimate'
|
|
179
|
+
: 'dyn_send_transaction.confirmation.data.gas', label: isGasEstimated
|
|
178
180
|
? t('dyn_send_transaction.confirmation.data.gas_estimate')
|
|
179
181
|
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice ? formatBigNumber.formatBigNumber(gasTotalPrice) : undefined, suffix: gasTotalPrice ? currencySymbol : undefined, icon: gasTotalPrice ? chainIcon : undefined, dataTestId: isGasEstimated
|
|
180
182
|
? 'transaction-estimated-gas-fee'
|
|
181
|
-
: 'transaction-gas-fee', children: gasTotalPrice ? formatBigNumber.formatBigNumber(gasTotalPrice, 10) : '--' }), jsxRuntime.jsx(TransactionRow.TransactionRow, { label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber.formatBigNumber(total) : undefined, suffix: total ? currencySymbol : undefined, icon: total ? chainIcon : undefined, dataTestId: 'transaction-total', children: total
|
|
183
|
+
: 'transaction-gas-fee', children: gasTotalPrice ? formatBigNumber.formatBigNumber(gasTotalPrice, 10) : '--' }), jsxRuntime.jsx(TransactionRow.TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.total', label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber.formatBigNumber(total) : undefined, suffix: total ? currencySymbol : undefined, icon: total ? chainIcon : undefined, dataTestId: 'transaction-total', children: total
|
|
182
184
|
? formatBigNumber.formatBigNumber(total, 10)
|
|
183
185
|
: t('dyn_send_transaction.confirmation.not_applied') })] }))] }));
|
|
184
186
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { Address, PublicClient, TransactionRequest } from 'viem';
|
|
3
|
+
import { CopyKey } from '../../shared';
|
|
3
4
|
export type TransactionConfirmationViewProps = {
|
|
4
5
|
displayPoweredByDynamicFooter?: boolean;
|
|
5
6
|
mutation: () => Promise<Address>;
|
|
@@ -10,5 +11,5 @@ export type TransactionConfirmationViewProps = {
|
|
|
10
11
|
title: ReactNode;
|
|
11
12
|
transaction: TransactionRequest;
|
|
12
13
|
provider: PublicClient;
|
|
13
|
-
};
|
|
14
|
+
} & CopyKey;
|
|
14
15
|
export declare const TransactionConfirmationView: FC<TransactionConfirmationViewProps>;
|
|
@@ -68,7 +68,7 @@ import { useTransactionTotal } from './hooks/useTransactionTotal/useTransactionT
|
|
|
68
68
|
import { transactionErrorMessage } from './helpers/transactionErrorMessage.js';
|
|
69
69
|
import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
70
70
|
|
|
71
|
-
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, }) => {
|
|
71
|
+
const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess, onClickBack, onClickClose, title, displayPoweredByDynamicFooter = false, provider, copykey, }) => {
|
|
72
72
|
const { appName, appLogoUrl, primaryWallet } = useInternalDynamicContext();
|
|
73
73
|
const appOrigin = getAppOrigin();
|
|
74
74
|
const [isGasSponsored, setIsGasSponsored] = useState(false);
|
|
@@ -150,13 +150,13 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
150
150
|
if (isTransactionLoading || Boolean(errorMessage))
|
|
151
151
|
return null;
|
|
152
152
|
if (TransactionGasCannotBeSponsoredError.isInstance(transactionError)) {
|
|
153
|
-
return (jsx(Alert, { icon: 'error', variant: 'error', children: t('dyn_send_transaction.error_message.gas_not_sponsored') }));
|
|
153
|
+
return (jsx(Alert, { icon: 'error', variant: 'error', copykey: 'dyn_send_transaction.error_message.gas_not_sponsored', children: t('dyn_send_transaction.error_message.gas_not_sponsored') }));
|
|
154
154
|
}
|
|
155
155
|
const showInsufficientFundsWarningMessage = hasInsufficientFunds && missingFunds;
|
|
156
156
|
if (!showInsufficientFundsWarningMessage)
|
|
157
157
|
return;
|
|
158
158
|
const amountLeft = formatBigNumber(missingFunds, 5);
|
|
159
|
-
return (jsx(Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
159
|
+
return (jsx(Alert, { icon: 'error', variant: 'warning', contentDataTestId: 'warning_content', copykey: 'dyn_send_transaction.warning_message.insufficient_funds', children: t('dyn_send_transaction.warning_message.insufficient_funds', {
|
|
160
160
|
amountLeft,
|
|
161
161
|
currencySymbol,
|
|
162
162
|
}) }));
|
|
@@ -169,12 +169,14 @@ const TransactionConfirmationView = ({ transaction, mutation, onError, onSuccess
|
|
|
169
169
|
isTransactionLoading,
|
|
170
170
|
errorMessage,
|
|
171
171
|
]);
|
|
172
|
-
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading || hasInsufficientFunds, error: errorMessage, alert: alert, children: [jsx(TransactionRow, { label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress(transactionFromAddress, 4, 4) }), jsx(TransactionRow, { label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
173
|
-
shortenWalletAddress(transactionToAddress, 4, 4) }), jsx(TransactionRow, { label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue ? formatBigNumber(transactionValue) : undefined, suffix: currencySymbol, icon: chainIcon, dataTestId: 'transaction-amount', children: transactionValue ? formatBigNumber(transactionValue, 10) : 0 }), !isGasSponsored && (jsxs(Fragment, { children: [jsx(TransactionRow, {
|
|
172
|
+
return (jsxs(TransactionConfirmationPageLayout, { onClickBack: onClickBack, onClickClose: onClickClose, copykey: copykey, title: title, appOrigin: appOrigin, appName: appName, appLogoUrl: appLogoUrl, isLoading: isLoading, onClickSend: () => send(), displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, disableSendButton: isTransactionLoading || hasInsufficientFunds, error: errorMessage, alert: alert, children: [jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.from', label: t('dyn_send_transaction.confirmation.data.from'), isLoading: isTransactionFromAddressLoading, title: transactionFromAddress, children: shortenWalletAddress(transactionFromAddress, 4, 4) }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.to', label: t('dyn_send_transaction.confirmation.data.to'), isLoading: isTransactionToAddressLoading, title: transactionToAddress, children: transactionToAddress &&
|
|
173
|
+
shortenWalletAddress(transactionToAddress, 4, 4) }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.amount', label: t('dyn_send_transaction.confirmation.data.amount'), isLoading: isTransactionValueLoading, isEmpty: !transactionValue, title: transactionValue ? formatBigNumber(transactionValue) : undefined, suffix: currencySymbol, icon: chainIcon, dataTestId: 'transaction-amount', children: transactionValue ? formatBigNumber(transactionValue, 10) : 0 }), !isGasSponsored && (jsxs(Fragment, { children: [jsx(TransactionRow, { copykey: isGasEstimated
|
|
174
|
+
? 'dyn_send_transaction.confirmation.data.gas_estimate'
|
|
175
|
+
: 'dyn_send_transaction.confirmation.data.gas', label: isGasEstimated
|
|
174
176
|
? t('dyn_send_transaction.confirmation.data.gas_estimate')
|
|
175
177
|
: t('dyn_send_transaction.confirmation.data.gas'), isEmpty: !gasTotalPrice, isLoading: isGasPriceLoading || isGasSponsoredLoading, title: gasTotalPrice ? formatBigNumber(gasTotalPrice) : undefined, suffix: gasTotalPrice ? currencySymbol : undefined, icon: gasTotalPrice ? chainIcon : undefined, dataTestId: isGasEstimated
|
|
176
178
|
? 'transaction-estimated-gas-fee'
|
|
177
|
-
: 'transaction-gas-fee', children: gasTotalPrice ? formatBigNumber(gasTotalPrice, 10) : '--' }), jsx(TransactionRow, { label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber(total) : undefined, suffix: total ? currencySymbol : undefined, icon: total ? chainIcon : undefined, dataTestId: 'transaction-total', children: total
|
|
179
|
+
: 'transaction-gas-fee', children: gasTotalPrice ? formatBigNumber(gasTotalPrice, 10) : '--' }), jsx(TransactionRow, { copykey: 'dyn_send_transaction.confirmation.data.total', label: t('dyn_send_transaction.confirmation.data.total'), isEmpty: !total, title: total ? formatBigNumber(total) : undefined, suffix: total ? currencySymbol : undefined, icon: total ? chainIcon : undefined, dataTestId: 'transaction-total', children: total
|
|
178
180
|
? formatBigNumber(total, 10)
|
|
179
181
|
: t('dyn_send_transaction.confirmation.not_applied') })] }))] }));
|
|
180
182
|
};
|
|
@@ -75,7 +75,7 @@ const WalletCannotBeTransferredView = () => {
|
|
|
75
75
|
_fetchPublicAddress();
|
|
76
76
|
}, [walletConnector]);
|
|
77
77
|
const _shortenWalletAddress = shortenWalletAddress.shortenWalletAddress(walletAddress);
|
|
78
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
78
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsxRuntime.jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
exports.WalletCannotBeTransferredView = WalletCannotBeTransferredView;
|
|
@@ -71,7 +71,7 @@ const WalletCannotBeTransferredView = () => {
|
|
|
71
71
|
_fetchPublicAddress();
|
|
72
72
|
}, [walletConnector]);
|
|
73
73
|
const _shortenWalletAddress = shortenWalletAddress(walletAddress);
|
|
74
|
-
return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.cannot_link.description') }), jsx(Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsx(Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
74
|
+
return (jsxs("div", { className: 'wallet-cannot-be-transferred-view__container', children: [jsx(Typography, { className: 'wallet-cannot-be-transferred-view__title', as: 'h6', variant: 'title', color: 'primary', weight: 'medium', copykey: 'dyn_wallet_link.cannot_link.title', children: t('dyn_wallet_link.cannot_link.title') }), jsx("div", { className: 'wallet-cannot-be-transferred-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__shorten-wallet-address', variant: 'body_normal', weight: 'regular', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-cannot-be-transferred-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.cannot_link.description', children: t('dyn_wallet_link.cannot_link.description') }), jsx(Button, { buttonClassName: 'wallet-cannot-be-transferred-view__transfer-alt-wallet-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: goToInitialView, dataTestId: 'wallet-cannot-be-transferred-view-transfer-alt-wallet', copykey: 'dyn_wallet_link.cannot_link.link_other_button', children: t('dyn_wallet_link.cannot_link.link_other_button') }), jsx(Button, { dataTestId: 'wallet-cannot-be-transferred-view-cancel', buttonPadding: 'small', buttonClassName: 'wallet-cannot-be-transferred-view__cancel', onClick: goToInitialView, copykey: 'dyn_wallet_link.cannot_link.cancel_button', children: t('dyn_wallet_link.cannot_link.cancel_button') })] }));
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export { WalletCannotBeTransferredView };
|
|
@@ -62,7 +62,7 @@ require('react-focus-lock');
|
|
|
62
62
|
|
|
63
63
|
const SearchNotFoundMessage = ({ title, subtitle, image, }) => {
|
|
64
64
|
const { t } = reactI18next.useTranslation();
|
|
65
|
-
return (jsxRuntime.jsxs("div", { className: 'search-instead__container', children: [image && (jsxRuntime.jsx(Icon.Icon, { className: 'search-instead__container__image', color: 'text-tertiary', children: image })), jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', weight: 'regular', children: title || t('dyn_wallet_list.wallet_missing.title') }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'button_primary', weight: 'regular', children: subtitle || t('dyn_wallet_list.wallet_missing.description') })] }));
|
|
65
|
+
return (jsxRuntime.jsxs("div", { className: 'search-instead__container', children: [image && (jsxRuntime.jsx(Icon.Icon, { className: 'search-instead__container__image', color: 'text-tertiary', children: image })), jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', weight: 'regular', copykey: 'dyn_wallet_list.wallet_missing.title', children: title || t('dyn_wallet_list.wallet_missing.title') }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'button_primary', weight: 'regular', copykey: 'dyn_wallet_list.wallet_missing.description', children: subtitle || t('dyn_wallet_list.wallet_missing.description') })] }));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
exports.SearchNotFoundMessage = SearchNotFoundMessage;
|
|
@@ -58,7 +58,7 @@ import 'react-focus-lock';
|
|
|
58
58
|
|
|
59
59
|
const SearchNotFoundMessage = ({ title, subtitle, image, }) => {
|
|
60
60
|
const { t } = useTranslation();
|
|
61
|
-
return (jsxs("div", { className: 'search-instead__container', children: [image && (jsx(Icon, { className: 'search-instead__container__image', color: 'text-tertiary', children: image })), jsx(Typography, { color: 'secondary', variant: 'body_small', weight: 'regular', children: title || t('dyn_wallet_list.wallet_missing.title') }), jsx(Typography, { color: 'primary', variant: 'button_primary', weight: 'regular', children: subtitle || t('dyn_wallet_list.wallet_missing.description') })] }));
|
|
61
|
+
return (jsxs("div", { className: 'search-instead__container', children: [image && (jsx(Icon, { className: 'search-instead__container__image', color: 'text-tertiary', children: image })), jsx(Typography, { color: 'secondary', variant: 'body_small', weight: 'regular', copykey: 'dyn_wallet_list.wallet_missing.title', children: title || t('dyn_wallet_list.wallet_missing.title') }), jsx(Typography, { color: 'primary', variant: 'button_primary', weight: 'regular', copykey: 'dyn_wallet_list.wallet_missing.description', children: subtitle || t('dyn_wallet_list.wallet_missing.description') })] }));
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export { SearchNotFoundMessage };
|
|
@@ -15,30 +15,27 @@ require('../../utils/constants/colors.cjs');
|
|
|
15
15
|
var walletListBuilder = require('../../utils/functions/walletListBuilder/walletListBuilder.cjs');
|
|
16
16
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
17
17
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
18
|
-
var MockContext = require('../../context/MockContext/MockContext.cjs');
|
|
19
|
-
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
20
|
-
var isUserLinkingWallet = require('../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.cjs');
|
|
21
18
|
var index = require('../../utils/functions/walletFilters/index.cjs');
|
|
22
19
|
require('@dynamic-labs/sdk-api');
|
|
23
20
|
require('../../shared/logger.cjs');
|
|
24
21
|
require('@dynamic-labs/iconic');
|
|
25
22
|
require('@dynamic-labs/wallet-connector-core');
|
|
23
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
26
24
|
var localStorage = require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
27
25
|
require('viem');
|
|
28
26
|
require('@dynamic-labs/utils');
|
|
29
27
|
require('../../shared/consts/index.cjs');
|
|
30
28
|
var noWalletFound = require('../../assets/no-wallet-found.cjs');
|
|
29
|
+
var useAuthLayoutChecks = require('../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs');
|
|
31
30
|
var SearchNotFoundMessage = require('./SearchNotFoundMessage/SearchNotFoundMessage.cjs');
|
|
32
31
|
var WalletListItem = require('./WalletListItem/WalletListItem.cjs');
|
|
33
32
|
|
|
34
33
|
localStorage.LocalStorage.setToLS(localStorage$1.WALLET_PICKER_SEARCH_KEY, '');
|
|
35
34
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
36
35
|
var _a;
|
|
37
|
-
const { walletsFilter, signWithEmailWalletName,
|
|
36
|
+
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet, walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
38
37
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
39
38
|
const { error } = ErrorContext.useErrorContext();
|
|
40
|
-
const { view } = ViewContext.useViewContext();
|
|
41
|
-
const { mockedSDK } = MockContext.useMockContext();
|
|
42
39
|
const { t } = reactI18next.useTranslation();
|
|
43
40
|
const [filterValue, setFilterValue] = React.useState((_a = localStorage.LocalStorage.getFromLS(localStorage$1.WALLET_PICKER_SEARCH_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
44
41
|
const [footerIsVisible, setFooterIsVisibile] = React.useState(false);
|
|
@@ -62,7 +59,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
62
59
|
});
|
|
63
60
|
const isSearchEnabled = numberOfWallets > defaultNumberOfWalletsToShow &&
|
|
64
61
|
walletsList.length !== numberOfWallets;
|
|
65
|
-
const
|
|
62
|
+
const { showDefaultFooter } = useAuthLayoutChecks.useAuthLayoutChecks(walletConnector);
|
|
66
63
|
const walletListScrollRef = React.useRef(null);
|
|
67
64
|
/* istanbul ignore next */
|
|
68
65
|
const handleScroll = () => {
|
|
@@ -83,11 +80,11 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
83
80
|
};
|
|
84
81
|
const searchContainer = !projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsxRuntime.jsx("div", { className: classNames.classNames('wallet-list__search-container', {
|
|
85
82
|
'wallet-list__search-container--scroll': !error,
|
|
86
|
-
}), children: jsxRuntime.jsx(Search.Search, { label: t('dyn_wallet_list.search.label', { numberOfWallets }), value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
83
|
+
}), children: jsxRuntime.jsx(Search.Search, { copykey: 'dyn_wallet_list.search.label', label: t('dyn_wallet_list.search.label', { numberOfWallets }), value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
87
84
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [searchContainer, Boolean(error) && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { className: 'wallet-list__error-container', withIcon: false, children: error })), jsxRuntime.jsx("div", { className: 'wallet-list__container', children: jsxRuntime.jsxs("div", { className: classNames.classNames('wallet-list__scroll-container', {
|
|
88
85
|
'wallet-list__scroll-container--error': Boolean(error),
|
|
89
86
|
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
90
|
-
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [walletConnectorOptions.length === 0 && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: t('dyn_wallet_list.configuration_mismatch') })), walletConnectorOptions.length && walletsList.length === 0 ? (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, { title: t('dyn_wallet_list.search.not_found.title'), subtitle: t('dyn_wallet_list.search.not_found.description'), image: jsxRuntime.jsx(noWalletFound.ReactComponent, {}) })) : (walletsList.map((wallet, index) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, {}))] }) }),
|
|
87
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [walletConnectorOptions.length === 0 && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { copykey: 'dyn_wallet_list.configuration_mismatch', children: t('dyn_wallet_list.configuration_mismatch') })), walletConnectorOptions.length && walletsList.length === 0 ? (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, { title: t('dyn_wallet_list.search.not_found.title'), subtitle: t('dyn_wallet_list.search.not_found.description'), image: jsxRuntime.jsx(noWalletFound.ReactComponent, {}) })) : (walletsList.map((wallet, index) => (jsxRuntime.jsx(WalletListItem.WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsxRuntime.jsx(SearchNotFoundMessage.SearchNotFoundMessage, {}))] }) }), showDefaultFooter && (jsxRuntime.jsx("div", { className: classNames.classNames('wallet-list__tiny-footer', {
|
|
91
88
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
92
89
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
93
90
|
};
|
|
@@ -11,30 +11,27 @@ import '../../utils/constants/colors.js';
|
|
|
11
11
|
import { walletListBuilder } from '../../utils/functions/walletListBuilder/walletListBuilder.js';
|
|
12
12
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
13
13
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
14
|
-
import { useMockContext } from '../../context/MockContext/MockContext.js';
|
|
15
|
-
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
16
|
-
import { isUserLinkingWallet } from '../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.js';
|
|
17
14
|
import { FilterBridgeChainsName } from '../../utils/functions/walletFilters/index.js';
|
|
18
15
|
import '@dynamic-labs/sdk-api';
|
|
19
16
|
import '../../shared/logger.js';
|
|
20
17
|
import '@dynamic-labs/iconic';
|
|
21
18
|
import '@dynamic-labs/wallet-connector-core';
|
|
19
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
22
20
|
import { LocalStorage } from '../../shared/utils/classes/storage/localStorage.js';
|
|
23
21
|
import 'viem';
|
|
24
22
|
import '@dynamic-labs/utils';
|
|
25
23
|
import '../../shared/consts/index.js';
|
|
26
24
|
import { ReactComponent as SvgNoWalletFound } from '../../assets/no-wallet-found.js';
|
|
25
|
+
import { useAuthLayoutChecks } from '../../utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js';
|
|
27
26
|
import { SearchNotFoundMessage } from './SearchNotFoundMessage/SearchNotFoundMessage.js';
|
|
28
27
|
import { WalletListItem } from './WalletListItem/WalletListItem.js';
|
|
29
28
|
|
|
30
29
|
LocalStorage.setToLS(WALLET_PICKER_SEARCH_KEY, '');
|
|
31
30
|
const WalletList = ({ isWalletConnectList = false, }) => {
|
|
32
31
|
var _a;
|
|
33
|
-
const { walletsFilter, signWithEmailWalletName,
|
|
32
|
+
const { walletsFilter, signWithEmailWalletName, walletConnectorOptions, projectSettings, defaultNumberOfWalletsToShow, bridgeChainsToConnect, connectedWallets, authMode, multiWallet, walletConnector, } = useInternalDynamicContext();
|
|
34
33
|
const { walletBook } = useWalletBookContext();
|
|
35
34
|
const { error } = useErrorContext();
|
|
36
|
-
const { view } = useViewContext();
|
|
37
|
-
const { mockedSDK } = useMockContext();
|
|
38
35
|
const { t } = useTranslation();
|
|
39
36
|
const [filterValue, setFilterValue] = useState((_a = LocalStorage.getFromLS(WALLET_PICKER_SEARCH_KEY)) !== null && _a !== void 0 ? _a : '');
|
|
40
37
|
const [footerIsVisible, setFooterIsVisibile] = useState(false);
|
|
@@ -58,7 +55,7 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
58
55
|
});
|
|
59
56
|
const isSearchEnabled = numberOfWallets > defaultNumberOfWalletsToShow &&
|
|
60
57
|
walletsList.length !== numberOfWallets;
|
|
61
|
-
const
|
|
58
|
+
const { showDefaultFooter } = useAuthLayoutChecks(walletConnector);
|
|
62
59
|
const walletListScrollRef = useRef(null);
|
|
63
60
|
/* istanbul ignore next */
|
|
64
61
|
const handleScroll = () => {
|
|
@@ -79,11 +76,11 @@ const WalletList = ({ isWalletConnectList = false, }) => {
|
|
|
79
76
|
};
|
|
80
77
|
const searchContainer = !projectSettings ? (jsx(Skeleton, { className: 'wallet-list__search-skeleton' })) : (isSearchEnabled && (jsx("div", { className: classNames('wallet-list__search-container', {
|
|
81
78
|
'wallet-list__search-container--scroll': !error,
|
|
82
|
-
}), children: jsx(Search, { label: t('dyn_wallet_list.search.label', { numberOfWallets }), value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
79
|
+
}), children: jsx(Search, { copykey: 'dyn_wallet_list.search.label', label: t('dyn_wallet_list.search.label', { numberOfWallets }), value: filterValue, onChange: ({ target: { value } }) => handleFilterValueChange(value), onClickClear: () => handleFilterValueChange('') }) })));
|
|
83
80
|
return (jsxs(Fragment, { children: [searchContainer, Boolean(error) && (jsx(ErrorContainer, { className: 'wallet-list__error-container', withIcon: false, children: error })), jsx("div", { className: 'wallet-list__container', children: jsxs("div", { className: classNames('wallet-list__scroll-container', {
|
|
84
81
|
'wallet-list__scroll-container--error': Boolean(error),
|
|
85
82
|
'wallet-list__scroll-container--full-height': isSearchEnabled,
|
|
86
|
-
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsx(Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxs(Fragment, { children: [walletConnectorOptions.length === 0 && (jsx(ErrorContainer, { children: t('dyn_wallet_list.configuration_mismatch') })), walletConnectorOptions.length && walletsList.length === 0 ? (jsx(SearchNotFoundMessage, { title: t('dyn_wallet_list.search.not_found.title'), subtitle: t('dyn_wallet_list.search.not_found.description'), image: jsx(SvgNoWalletFound, {}) })) : (walletsList.map((wallet, index) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsx(SearchNotFoundMessage, {}))] }) }),
|
|
83
|
+
}), "data-testid": 'wallet-list-scroll-container', ref: walletListScrollRef, onScroll: handleScroll, children: [!projectSettings ? (jsx(Skeleton, { count: 10, className: 'wallet-list__tile-skeleton' })) : (jsxs(Fragment, { children: [walletConnectorOptions.length === 0 && (jsx(ErrorContainer, { copykey: 'dyn_wallet_list.configuration_mismatch', children: t('dyn_wallet_list.configuration_mismatch') })), walletConnectorOptions.length && walletsList.length === 0 ? (jsx(SearchNotFoundMessage, { title: t('dyn_wallet_list.search.not_found.title'), subtitle: t('dyn_wallet_list.search.not_found.description'), image: jsx(SvgNoWalletFound, {}) })) : (walletsList.map((wallet, index) => (jsx(WalletListItem, { wallet: wallet, usingMultiWallet: multiWallet, onResetSearchValue: () => handleFilterValueChange('') }, `${wallet.key}_${index}`))))] })), isSearchEnabled && !filterValue && projectSettings && (jsx(SearchNotFoundMessage, {}))] }) }), showDefaultFooter && (jsx("div", { className: classNames('wallet-list__tiny-footer', {
|
|
87
84
|
'wallet-list__tiny-footer--hidden': footerIsVisible,
|
|
88
85
|
}), "data-testid": 'wallet-list-tiny-footer' }))] }));
|
|
89
86
|
};
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
8
9
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
9
10
|
require('@dynamic-labs/utils');
|
|
10
11
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
@@ -29,7 +30,6 @@ require('react-dom');
|
|
|
29
30
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
30
31
|
require('@dynamic-labs/types');
|
|
31
32
|
require('yup');
|
|
32
|
-
require('react-i18next');
|
|
33
33
|
require('../../context/MockContext/MockContext.cjs');
|
|
34
34
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
35
35
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -69,6 +69,7 @@ require('react-focus-lock');
|
|
|
69
69
|
const iconSize = 64;
|
|
70
70
|
const WalletLockedView = () => {
|
|
71
71
|
const { handleLogOut, primaryWallet, setShowAuthFlow, appName, authToken } = useInternalDynamicContext.useInternalDynamicContext();
|
|
72
|
+
const { t } = reactI18next.useTranslation();
|
|
72
73
|
React.useEffect(() => {
|
|
73
74
|
// when there is no valid session, we want to log user out
|
|
74
75
|
if (!authToken) {
|
|
@@ -91,7 +92,7 @@ const WalletLockedView = () => {
|
|
|
91
92
|
height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
92
93
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
93
94
|
} }));
|
|
94
|
-
return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container',
|
|
95
|
+
return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', copykey: 'dyn_wallet_locked.connect_continue', children: t('dyn_wallet_locked.connect_continue') }), jsxRuntime.jsxs("div", { className: 'wallet-locked-view__content', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', copykey: 'dyn_wallet_locked.title', children: t('dyn_wallet_locked.title') }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_locked.subtitle', children: [t('dyn_wallet_locked.subtitle'), appName, "."] }), jsxRuntime.jsx(Button.Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', copykey: 'dyn_wallet_locked.connect', children: t('dyn_wallet_locked.connect') }), jsxRuntime.jsx(Divider.Divider, { text: 'Or' }), jsxRuntime.jsx(TextButton.TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, copykey: 'dyn_wallet_locked.logout', children: t('dyn_wallet_locked.logout') })] })] }));
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
exports.WalletLockedView = WalletLockedView;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
4
5
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
5
6
|
import '@dynamic-labs/utils';
|
|
6
7
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
@@ -25,7 +26,6 @@ import 'react-dom';
|
|
|
25
26
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
26
27
|
import '@dynamic-labs/types';
|
|
27
28
|
import 'yup';
|
|
28
|
-
import 'react-i18next';
|
|
29
29
|
import '../../context/MockContext/MockContext.js';
|
|
30
30
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
31
31
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -65,6 +65,7 @@ import 'react-focus-lock';
|
|
|
65
65
|
const iconSize = 64;
|
|
66
66
|
const WalletLockedView = () => {
|
|
67
67
|
const { handleLogOut, primaryWallet, setShowAuthFlow, appName, authToken } = useInternalDynamicContext();
|
|
68
|
+
const { t } = useTranslation();
|
|
68
69
|
useEffect(() => {
|
|
69
70
|
// when there is no valid session, we want to log user out
|
|
70
71
|
if (!authToken) {
|
|
@@ -87,7 +88,7 @@ const WalletLockedView = () => {
|
|
|
87
88
|
height: pixelToRem(iconSize * iconRatio),
|
|
88
89
|
width: pixelToRem(iconSize * iconRatio),
|
|
89
90
|
} }));
|
|
90
|
-
return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container',
|
|
91
|
+
return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', copykey: 'dyn_wallet_locked.connect_continue', children: t('dyn_wallet_locked.connect_continue') }), jsxs("div", { className: 'wallet-locked-view__content', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', copykey: 'dyn_wallet_locked.title', children: t('dyn_wallet_locked.title') }), jsxs(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_locked.subtitle', children: [t('dyn_wallet_locked.subtitle'), appName, "."] }), jsx(Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', copykey: 'dyn_wallet_locked.connect', children: t('dyn_wallet_locked.connect') }), jsx(Divider, { text: 'Or' }), jsx(TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, copykey: 'dyn_wallet_locked.logout', children: t('dyn_wallet_locked.logout') })] })] }));
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
export { WalletLockedView };
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var reactI18next = require('react-i18next');
|
|
7
8
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
8
9
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
9
10
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
@@ -30,7 +31,6 @@ require('react-dom');
|
|
|
30
31
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
31
32
|
require('@dynamic-labs/types');
|
|
32
33
|
require('yup');
|
|
33
|
-
require('react-i18next');
|
|
34
34
|
require('../../context/MockContext/MockContext.cjs');
|
|
35
35
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
36
36
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -66,6 +66,7 @@ require('react-focus-lock');
|
|
|
66
66
|
|
|
67
67
|
const WalletSignSpinnerView = () => {
|
|
68
68
|
const { goToInitialView } = ViewContext.useViewContext();
|
|
69
|
+
const { t } = reactI18next.useTranslation();
|
|
69
70
|
const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
70
71
|
if (!walletConnector) {
|
|
71
72
|
return null;
|
|
@@ -82,10 +83,10 @@ const WalletSignSpinnerView = () => {
|
|
|
82
83
|
height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
83
84
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
84
85
|
} }));
|
|
85
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('wallet-sign-spinner__copy'),
|
|
86
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('wallet-sign-spinner__copy'), copykey: 'dyn_wallet_transfer.sign.spinner.confirm_transfer', children: t('dyn_wallet_transfer.sign.spinner.confirm_transfer') }), jsxRuntime.jsx(Button.Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
|
|
86
87
|
variant: 'button_primary',
|
|
87
88
|
weight: 'medium',
|
|
88
|
-
}, children:
|
|
89
|
+
}, copykey: 'dyn_wallet_transfer.sign.spinner.cancel', children: t('dyn_wallet_transfer.sign.spinner.cancel') })] }));
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
exports.WalletSignSpinnerView = WalletSignSpinnerView;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
3
4
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
4
5
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
5
6
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
@@ -26,7 +27,6 @@ import 'react-dom';
|
|
|
26
27
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
27
28
|
import '@dynamic-labs/types';
|
|
28
29
|
import 'yup';
|
|
29
|
-
import 'react-i18next';
|
|
30
30
|
import '../../context/MockContext/MockContext.js';
|
|
31
31
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
32
32
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -62,6 +62,7 @@ import 'react-focus-lock';
|
|
|
62
62
|
|
|
63
63
|
const WalletSignSpinnerView = () => {
|
|
64
64
|
const { goToInitialView } = useViewContext();
|
|
65
|
+
const { t } = useTranslation();
|
|
65
66
|
const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
|
|
66
67
|
if (!walletConnector) {
|
|
67
68
|
return null;
|
|
@@ -78,10 +79,10 @@ const WalletSignSpinnerView = () => {
|
|
|
78
79
|
height: pixelToRem(iconSize * iconRatio),
|
|
79
80
|
width: pixelToRem(iconSize * iconRatio),
|
|
80
81
|
} }));
|
|
81
|
-
return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('wallet-sign-spinner__copy'),
|
|
82
|
+
return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('wallet-sign-spinner__copy'), copykey: 'dyn_wallet_transfer.sign.spinner.confirm_transfer', children: t('dyn_wallet_transfer.sign.spinner.confirm_transfer') }), jsx(Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
|
|
82
83
|
variant: 'button_primary',
|
|
83
84
|
weight: 'medium',
|
|
84
|
-
}, children:
|
|
85
|
+
}, copykey: 'dyn_wallet_transfer.sign.spinner.cancel', children: t('dyn_wallet_transfer.sign.spinner.cancel') })] }));
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
export { WalletSignSpinnerView };
|
|
@@ -158,7 +158,7 @@ const WalletUsedView = () => {
|
|
|
158
158
|
setMultiWalletWidgetState('idle');
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-used-view__container', children: [jsxRuntime.jsx("div", { className: 'wallet-used-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.existent_account.warning') }), isSingleWalletAccount && (jsxRuntime.jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsxRuntime.jsx(Checkbox.Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_wallet_link.existent_account.acceptance') })] })), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', children: t('dyn_wallet_link.confirm_button') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, children: t('dyn_wallet_link.log_out_button') })] }));
|
|
161
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-used-view__container', children: [jsxRuntime.jsx("div", { className: 'wallet-used-view__icon', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsxRuntime.jsx(Typography.Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.existent_account.warning', children: t('dyn_wallet_link.existent_account.warning') }), isSingleWalletAccount && (jsxRuntime.jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsxRuntime.jsx(Checkbox.Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_wallet_link.existent_account.acceptance', children: t('dyn_wallet_link.existent_account.acceptance') })] })), jsxRuntime.jsx(Button.Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', copykey: 'dyn_wallet_link.confirm_button', children: t('dyn_wallet_link.confirm_button') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, copykey: 'dyn_wallet_link.log_out_button', children: t('dyn_wallet_link.log_out_button') })] }));
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
exports.WalletUsedView = WalletUsedView;
|
|
@@ -154,7 +154,7 @@ const WalletUsedView = () => {
|
|
|
154
154
|
setMultiWalletWidgetState('idle');
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
|
-
return (jsxs("div", { className: 'wallet-used-view__container', children: [jsx("div", { className: 'wallet-used-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', children: t('dyn_wallet_link.existent_account.warning') }), isSingleWalletAccount && (jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsx(Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsx(Typography, { variant: 'body_small', color: 'secondary', children: t('dyn_wallet_link.existent_account.acceptance') })] })), jsx(Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', children: t('dyn_wallet_link.confirm_button') }), jsx(Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, children: t('dyn_wallet_link.log_out_button') })] }));
|
|
157
|
+
return (jsxs("div", { className: 'wallet-used-view__container', children: [jsx("div", { className: 'wallet-used-view__icon', children: jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, width: 64, height: 64 }) }), jsx(Typography, { className: 'wallet-used-view__shorten-wallet-address', variant: 'body_normal', weight: 'medium', color: 'primary', children: _shortenWalletAddress }), jsx(Typography, { className: 'wallet-used-view__copy', variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_link.existent_account.warning', children: t('dyn_wallet_link.existent_account.warning') }), isSingleWalletAccount && (jsxs("label", { htmlFor: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-label', children: [jsx(Checkbox, { id: 'skipEmptyAccountCheck', className: 'wallet-used-view__checkbox-container', defaultChecked: isChecked, onChange: () => setIsChecked(!isChecked), ariaLabel: 'skip empty account check' }), jsx(Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_wallet_link.existent_account.acceptance', children: t('dyn_wallet_link.existent_account.acceptance') })] })), jsx(Button, { buttonClassName: 'wallet-used-view__accept-button', buttonVariant: 'primary', expanded: true, buttonPadding: 'large', onClick: () => handleWalletTransfer(), disabled: (!isChecked && isSingleWalletAccount) || loading, dataTestId: 'wallet-used-view-transfer-wallet', copykey: 'dyn_wallet_link.confirm_button', children: t('dyn_wallet_link.confirm_button') }), jsx(Button, { dataTestId: 'wallet-used-view-log-out', buttonPadding: 'small', buttonClassName: 'wallet-used-view__logout', onClick: handleLogOut, copykey: 'dyn_wallet_link.log_out_button', children: t('dyn_wallet_link.log_out_button') })] }));
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
export { WalletUsedView };
|