@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
|
@@ -109,9 +109,9 @@ const NetworkNotSupported = () => {
|
|
|
109
109
|
network: walletConnectorNetwork,
|
|
110
110
|
walletConnector,
|
|
111
111
|
});
|
|
112
|
-
return (jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', children: t('dyn_network_not_supported.warning_message') })), jsxs("div", { className: classNames('network-not-supported__content-container', {
|
|
112
|
+
return (jsxs("div", { className: 'network-not-supported', "data-testid": 'network-not-supported', children: [onboardingImageUrl && (jsx("img", { className: 'network-not-supported__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, { variant: 'info', withIcon: false, className: 'network-not-supported__error--not-supported', copykey: 'dyn_network_not_supported.warning_message', children: t('dyn_network_not_supported.warning_message') })), jsxs("div", { className: classNames('network-not-supported__content-container', {
|
|
113
113
|
'network-not-supported__content-container--error': !_isSupportedNetwork,
|
|
114
|
-
}), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsx(NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsx("div", { className: 'network-not-supported__welcome-container', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsx(SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
|
|
114
|
+
}), children: [jsx("div", { className: 'network-not-supported__img-container', children: jsx(WalletIcon, { style: { height: 64, width: 64 }, walletKey: walletConnector.key }) }), jsx(UserAddress, { walletConnector: walletConnector }), jsx("div", { className: 'network-not-supported__network-container', children: evmNetworks.length > 1 && (jsx(NetworkPicker, { currentNetwork: walletConnectorNetwork, evmNetworks: evmNetworks, connector: walletConnector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, showNetworkName: true, buttonClassName: 'network-not-supported__network-picker-button', mainClassName: 'network-not-supported__network-picker' })) }), jsx("div", { className: 'network-not-supported__welcome-container', children: jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', copykey: 'dyn_network_not_supported.subtitle', children: t('dyn_network_not_supported.subtitle') }) }), evmNetworks.length === 1 && (jsx(SelectNetworkButton, { onClick: onSelectNetworkButtonClick, networkId: evmNetworks[0].networkId, networkName: evmNetworks[0].vanityName || evmNetworks[0].name, networkIconUrl: evmNetworks[0].iconUrls[0] }))] })] }));
|
|
115
115
|
};
|
|
116
116
|
|
|
117
117
|
export { NetworkNotSupported };
|
|
@@ -102,7 +102,9 @@ const NetworkNotSupportedSwitchManual = () => {
|
|
|
102
102
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
103
103
|
} }));
|
|
104
104
|
const walletConnectorNetworks = getWalletConnectorNetworks.getWalletConnectorNetworks(walletConnector);
|
|
105
|
-
return (jsxRuntime.jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxRuntime.jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsxRuntime.jsx(Typography.Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', children: t('dyn_network_not_supported_manual_switch.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary',
|
|
105
|
+
return (jsxRuntime.jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsxRuntime.jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxRuntime.jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsxRuntime.jsx(Typography.Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', copykey: 'dyn_network_not_supported_manual_switch.title', children: t('dyn_network_not_supported_manual_switch.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', copykey: walletConnectorNetworks.length
|
|
106
|
+
? 'dyn_network_not_supported_manual_switch.subtitle_network_defined'
|
|
107
|
+
: 'dyn_network_not_supported_manual_switch.subtitle_no_network_defined', children: walletConnectorNetworks.length
|
|
106
108
|
? t('dyn_network_not_supported_manual_switch.subtitle_network_defined', { network: walletConnectorNetworks[0].name })
|
|
107
109
|
: t('dyn_network_not_supported_manual_switch.subtitle_no_network_defined') })] })] }));
|
|
108
110
|
};
|
|
@@ -98,7 +98,9 @@ const NetworkNotSupportedSwitchManual = () => {
|
|
|
98
98
|
width: pixelToRem(iconSize * iconRatio),
|
|
99
99
|
} }));
|
|
100
100
|
const walletConnectorNetworks = getWalletConnectorNetworks(walletConnector);
|
|
101
|
-
return (jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsx(Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', children: t('dyn_network_not_supported_manual_switch.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary',
|
|
101
|
+
return (jsxs("div", { "data-testid": 'network-not-supported', className: 'network-not-supported-switch-manual', children: [jsx("div", { className: 'network-not-supported-switch-manual__img-container', children: ((_a = user === null || user === void 0 ? void 0 : user.ens) === null || _a === void 0 ? void 0 : _a.avatar) ? (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx("img", { src: (_b = user === null || user === void 0 ? void 0 : user.ens) === null || _b === void 0 ? void 0 : _b.avatar, alt: 'user ens avatar', className: 'network-not-supported-switch-manual__img' }) })) : (jsx("div", { className: 'network-not-supported-switch-manual__network-container', children: jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }) })) }), jsxs("div", { className: 'network-not-supported-switch-manual__content', children: [jsx(Typography, { className: 'network-not-supported-switch-manual__title', weight: 'medium', variant: 'title', color: 'primary', copykey: 'dyn_network_not_supported_manual_switch.title', children: t('dyn_network_not_supported_manual_switch.title') }), jsx(Typography, { variant: 'body_normal', color: 'secondary', copykey: walletConnectorNetworks.length
|
|
102
|
+
? 'dyn_network_not_supported_manual_switch.subtitle_network_defined'
|
|
103
|
+
: 'dyn_network_not_supported_manual_switch.subtitle_no_network_defined', children: walletConnectorNetworks.length
|
|
102
104
|
? t('dyn_network_not_supported_manual_switch.subtitle_network_defined', { network: walletConnectorNetworks[0].name })
|
|
103
105
|
: t('dyn_network_not_supported_manual_switch.subtitle_no_network_defined') })] })] }));
|
|
104
106
|
};
|
|
@@ -96,7 +96,7 @@ const NoAccess = () => {
|
|
|
96
96
|
const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
|
|
97
97
|
const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
|
|
98
98
|
const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
|
|
99
|
-
return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(Button.Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
|
|
99
|
+
return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(Button.Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
|
|
100
100
|
height: pixelToRem.pixelToRem(24),
|
|
101
101
|
width: pixelToRem.pixelToRem(24),
|
|
102
102
|
} }))] }), typeof socialMediaIconUrl === 'string' && (jsxRuntime.jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {
|
|
@@ -92,7 +92,7 @@ const NoAccess = () => {
|
|
|
92
92
|
const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
|
|
93
93
|
const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
|
|
94
94
|
const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
|
|
95
|
-
return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
|
|
95
|
+
return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(Button, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
|
|
96
96
|
height: pixelToRem(24),
|
|
97
97
|
width: pixelToRem(24),
|
|
98
98
|
} }))] }), typeof socialMediaIconUrl === 'string' && (jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
6
7
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
8
|
require('react');
|
|
8
9
|
require('@dynamic-labs/utils');
|
|
@@ -28,7 +29,6 @@ require('react-dom');
|
|
|
28
29
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
29
30
|
require('@dynamic-labs/types');
|
|
30
31
|
require('yup');
|
|
31
|
-
require('react-i18next');
|
|
32
32
|
require('../../context/MockContext/MockContext.cjs');
|
|
33
33
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
34
34
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -65,6 +65,7 @@ require('react-focus-lock');
|
|
|
65
65
|
const NoQrNotInstalledView = () => {
|
|
66
66
|
const { selectedWalletConnector } = useInternalDynamicContext.useInternalDynamicContext();
|
|
67
67
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
68
|
+
const { t } = reactI18next.useTranslation();
|
|
68
69
|
if (!selectedWalletConnector) {
|
|
69
70
|
return null;
|
|
70
71
|
}
|
|
@@ -74,7 +75,10 @@ const NoQrNotInstalledView = () => {
|
|
|
74
75
|
.map(([name, link]) => (jsxRuntime.jsx(WalletHelpLink.WalletHelpLink, { name: name, link: link,
|
|
75
76
|
// justification: we're looping over the keys of walletLinks.desktop
|
|
76
77
|
Icon: getBrowserIcon.getBrowserIcon(name) }, name)));
|
|
77
|
-
return (jsxRuntime.jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsxRuntime.jsx("div", { className: 'no-qr-code-installed__img', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } }) }), jsxRuntime.
|
|
78
|
+
return (jsxRuntime.jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsxRuntime.jsx("div", { className: 'no-qr-code-installed__img', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } }) }), jsxRuntime.jsx(Typography.Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', copykey: 'dyn_qr_code.wallet_not_installed.install', children: t('dyn_qr_code.wallet_not_installed.install', {
|
|
79
|
+
wallet: walletBook.getWalletBookWallet(walletBook$1, selectedWalletConnector.key)
|
|
80
|
+
.name,
|
|
81
|
+
}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.select', children: t('dyn_qr_code.wallet_not_installed.select') }), jsxRuntime.jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.refresh', children: t('dyn_qr_code.wallet_not_installed.refresh') })] }));
|
|
78
82
|
};
|
|
79
83
|
|
|
80
84
|
exports.NoQrNotInstalledView = NoQrNotInstalledView;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { useWalletBookContext, getWalletLinks, WalletIcon, getWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
3
4
|
import 'react';
|
|
4
5
|
import '@dynamic-labs/utils';
|
|
@@ -24,7 +25,6 @@ import 'react-dom';
|
|
|
24
25
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
25
26
|
import '@dynamic-labs/types';
|
|
26
27
|
import 'yup';
|
|
27
|
-
import 'react-i18next';
|
|
28
28
|
import '../../context/MockContext/MockContext.js';
|
|
29
29
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
30
30
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -61,6 +61,7 @@ import 'react-focus-lock';
|
|
|
61
61
|
const NoQrNotInstalledView = () => {
|
|
62
62
|
const { selectedWalletConnector } = useInternalDynamicContext();
|
|
63
63
|
const { walletBook } = useWalletBookContext();
|
|
64
|
+
const { t } = useTranslation();
|
|
64
65
|
if (!selectedWalletConnector) {
|
|
65
66
|
return null;
|
|
66
67
|
}
|
|
@@ -70,7 +71,10 @@ const NoQrNotInstalledView = () => {
|
|
|
70
71
|
.map(([name, link]) => (jsx(WalletHelpLink, { name: name, link: link,
|
|
71
72
|
// justification: we're looping over the keys of walletLinks.desktop
|
|
72
73
|
Icon: getBrowserIcon(name) }, name)));
|
|
73
|
-
return (jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsx("div", { className: 'no-qr-code-installed__img', children: jsx(WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem(64), width: pixelToRem(64) } }) }),
|
|
74
|
+
return (jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsx("div", { className: 'no-qr-code-installed__img', children: jsx(WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem(64), width: pixelToRem(64) } }) }), jsx(Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', copykey: 'dyn_qr_code.wallet_not_installed.install', children: t('dyn_qr_code.wallet_not_installed.install', {
|
|
75
|
+
wallet: getWalletBookWallet(walletBook, selectedWalletConnector.key)
|
|
76
|
+
.name,
|
|
77
|
+
}) }), jsx(Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.select', children: t('dyn_qr_code.wallet_not_installed.select') }), jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsx(Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.refresh', children: t('dyn_qr_code.wallet_not_installed.refresh') })] }));
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
export { NoQrNotInstalledView };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
6
7
|
require('react');
|
|
7
8
|
require('@dynamic-labs/utils');
|
|
8
9
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
@@ -27,7 +28,6 @@ require('react-dom');
|
|
|
27
28
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
28
29
|
require('@dynamic-labs/types');
|
|
29
30
|
require('yup');
|
|
30
|
-
require('react-i18next');
|
|
31
31
|
require('../../context/MockContext/MockContext.cjs');
|
|
32
32
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
33
33
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -60,9 +60,14 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
|
60
60
|
require('react-focus-lock');
|
|
61
61
|
|
|
62
62
|
const capitalize = (value) => value[0].toUpperCase() + value.slice(1);
|
|
63
|
-
const WalletHelpLink = ({ name, link, Icon }) =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
const WalletHelpLink = ({ name, link, Icon }) => {
|
|
64
|
+
const { t } = reactI18next.useTranslation();
|
|
65
|
+
return (jsxRuntime.jsx("div", { className: 'wallet-help-link', children: jsxRuntime.jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsxRuntime.jsx(Icon, { style: {
|
|
66
|
+
height: '1.5rem',
|
|
67
|
+
width: '1.5rem',
|
|
68
|
+
} }), jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', weight: 'medium', copykey: 'dyn_qr_code.wallet_not_installed.browser_install', children: t('dyn_qr_code.wallet_not_installed.browser_install', {
|
|
69
|
+
browser: capitalize(name),
|
|
70
|
+
}) })] }) }));
|
|
71
|
+
};
|
|
67
72
|
|
|
68
73
|
exports.WalletHelpLink = WalletHelpLink;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import 'react';
|
|
3
4
|
import '@dynamic-labs/utils';
|
|
4
5
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
@@ -23,7 +24,6 @@ import 'react-dom';
|
|
|
23
24
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
24
25
|
import '@dynamic-labs/types';
|
|
25
26
|
import 'yup';
|
|
26
|
-
import 'react-i18next';
|
|
27
27
|
import '../../context/MockContext/MockContext.js';
|
|
28
28
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
29
29
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -56,9 +56,14 @@ import '../../components/Popper/PopperContext/PopperContext.js';
|
|
|
56
56
|
import 'react-focus-lock';
|
|
57
57
|
|
|
58
58
|
const capitalize = (value) => value[0].toUpperCase() + value.slice(1);
|
|
59
|
-
const WalletHelpLink = ({ name, link, Icon }) =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
const WalletHelpLink = ({ name, link, Icon }) => {
|
|
60
|
+
const { t } = useTranslation();
|
|
61
|
+
return (jsx("div", { className: 'wallet-help-link', children: jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsx(Icon, { style: {
|
|
62
|
+
height: '1.5rem',
|
|
63
|
+
width: '1.5rem',
|
|
64
|
+
} }), jsx(Typography, { variant: 'button_primary', weight: 'medium', copykey: 'dyn_qr_code.wallet_not_installed.browser_install', children: t('dyn_qr_code.wallet_not_installed.browser_install', {
|
|
65
|
+
browser: capitalize(name),
|
|
66
|
+
}) })] }) }));
|
|
67
|
+
};
|
|
63
68
|
|
|
64
69
|
export { WalletHelpLink };
|
|
@@ -107,10 +107,10 @@ const PasskeyIntroView = () => {
|
|
|
107
107
|
}
|
|
108
108
|
return getProperErrorMessage.getProperErrorMessage(error);
|
|
109
109
|
}, [error]);
|
|
110
|
-
const infoIconButton = (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsxRuntime.jsx(questionMark.ReactComponent, {}) }) }, 'info-button'));
|
|
111
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: infoIconButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t('dyn_passkey_intro.title') }) }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view', children: [jsxRuntime.jsx("div", { className: 'passkey-intro-view__header', children: jsxRuntime.jsx(passkeyIntroIcon.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: t('dyn_passkey_intro.disabled') })), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view__actions', children: [jsxRuntime.jsx(Button.Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: handleCreateEmbeddedWallet, dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
110
|
+
const infoIconButton = (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', copykey: 'dyn_passkey_intro.helper.tooltip', children: jsxRuntime.jsx(IconButton.IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsxRuntime.jsx(questionMark.ReactComponent, {}) }) }, 'info-button'));
|
|
111
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: infoIconButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_passkey_intro.title', children: t('dyn_passkey_intro.title') }) }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view', children: [jsxRuntime.jsx("div", { className: 'passkey-intro-view__header', children: jsxRuntime.jsx(passkeyIntroIcon.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', copykey: 'dyn_passkey_intro.subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { copykey: 'dyn_passkey_intro.disabled', children: t('dyn_passkey_intro.disabled') })), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsxs("div", { className: 'passkey-intro-view__actions', children: [jsxRuntime.jsx(Button.Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: handleCreateEmbeddedWallet, dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
112
112
|
color: 'inherit',
|
|
113
|
-
}, children: jsxRuntime.jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, {}), jsxRuntime.jsx(Typography.Typography, { children: t('dyn_passkey_intro.button') })] }) }), jsxRuntime.jsx(TextButton.TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
113
|
+
}, children: jsxRuntime.jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, {}), jsxRuntime.jsx(Typography.Typography, { copykey: 'dyn_passkey_intro.button', children: t('dyn_passkey_intro.button') })] }) }), jsxRuntime.jsx(TextButton.TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, copykey: 'dyn_passkey_intro.button_logout', children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
exports.PasskeyIntroView = PasskeyIntroView;
|
|
@@ -103,10 +103,10 @@ const PasskeyIntroView = () => {
|
|
|
103
103
|
}
|
|
104
104
|
return getProperErrorMessage(error);
|
|
105
105
|
}, [error]);
|
|
106
|
-
const infoIconButton = (jsx(Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', children: jsx(IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsx(SvgQuestionMark, {}) }) }, 'info-button'));
|
|
107
|
-
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: infoIconButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t('dyn_passkey_intro.title') }) }), jsxs("div", { className: 'passkey-intro-view', children: [jsx("div", { className: 'passkey-intro-view__header', children: jsx(SvgPasskeyIntroIcon, {}) }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsx(ErrorContainer, { children: t('dyn_passkey_intro.disabled') })), errorText && jsx(ErrorContainer, { children: errorText }), jsxs("div", { className: 'passkey-intro-view__actions', children: [jsx(Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: handleCreateEmbeddedWallet, dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
106
|
+
const infoIconButton = (jsx(Tooltip, { content: t('dyn_passkey_intro.helper.tooltip'), className: 'header__tooltip', copykey: 'dyn_passkey_intro.helper.tooltip', children: jsx(IconButton, { type: 'button', "data-testid": 'info-button', onClick: () => setIsFooterExpanded((prev) => !prev), className: 'header__icon', children: jsx(SvgQuestionMark, {}) }) }, 'info-button'));
|
|
107
|
+
return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: infoIconButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: 'dyn_passkey_intro.title', children: t('dyn_passkey_intro.title') }) }), jsxs("div", { className: 'passkey-intro-view', children: [jsx("div", { className: 'passkey-intro-view__header', children: jsx(SvgPasskeyIntroIcon, {}) }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-intro-view__subtitle', copykey: 'dyn_passkey_intro.subtitle', children: t('dyn_passkey_intro.subtitle') }), passkeyEnabled === false && (jsx(ErrorContainer, { copykey: 'dyn_passkey_intro.disabled', children: t('dyn_passkey_intro.disabled') })), errorText && jsx(ErrorContainer, { children: errorText }), jsxs("div", { className: 'passkey-intro-view__actions', children: [jsx(Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', onClick: handleCreateEmbeddedWallet, dataTestId: 'setup-passkey-button', loading: isLoading, disabled: isLoading || !passkeyEnabled, typographyProps: {
|
|
108
108
|
color: 'inherit',
|
|
109
|
-
}, children: jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsx(PasskeyDeviceIcon, {}), jsx(Typography, { children: t('dyn_passkey_intro.button') })] }) }), jsx(TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
109
|
+
}, children: jsxs("div", { className: 'passkey-intro-view__inline-button', children: [jsx(PasskeyDeviceIcon, {}), jsx(Typography, { copykey: 'dyn_passkey_intro.button', children: t('dyn_passkey_intro.button') })] }) }), jsx(TextButton, { "data-testid": 'setup-passkey-logout-button', className: 'passkey-intro-view__log-out', onClick: handleLogOut, copykey: 'dyn_passkey_intro.button_logout', children: t('dyn_passkey_intro.button_logout') })] })] })] }));
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
export { PasskeyIntroView };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
6
7
|
var utils = require('@dynamic-labs/utils');
|
|
7
8
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
8
9
|
require('react');
|
|
@@ -28,7 +29,6 @@ require('react-dom');
|
|
|
28
29
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
29
30
|
require('@dynamic-labs/types');
|
|
30
31
|
require('yup');
|
|
31
|
-
require('react-i18next');
|
|
32
32
|
require('../../context/MockContext/MockContext.cjs');
|
|
33
33
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
34
34
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -63,14 +63,17 @@ require('react-focus-lock');
|
|
|
63
63
|
|
|
64
64
|
const PendingConnectView = () => {
|
|
65
65
|
const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
|
|
66
|
+
const { t } = reactI18next.useTranslation();
|
|
66
67
|
const iconSize = 94;
|
|
67
68
|
const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, style: {
|
|
68
69
|
height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
69
70
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
70
71
|
} }));
|
|
71
|
-
return (jsxRuntime.jsxs("div", { className: 'pending-connect__container', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text',
|
|
72
|
-
? '
|
|
73
|
-
: '
|
|
72
|
+
return (jsxRuntime.jsxs("div", { className: 'pending-connect__container', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', copykey: utils.isMobile()
|
|
73
|
+
? 'dyn_pending_connection.mobile'
|
|
74
|
+
: 'dyn_pending_connection.computer', children: utils.isMobile()
|
|
75
|
+
? t('dyn_pending_connection.mobile')
|
|
76
|
+
: t('dyn_pending_connection.computer') })] }));
|
|
74
77
|
};
|
|
75
78
|
|
|
76
79
|
exports.PendingConnectView = PendingConnectView;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { isMobile } from '@dynamic-labs/utils';
|
|
3
4
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
4
5
|
import 'react';
|
|
@@ -24,7 +25,6 @@ import 'react-dom';
|
|
|
24
25
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
25
26
|
import '@dynamic-labs/types';
|
|
26
27
|
import 'yup';
|
|
27
|
-
import 'react-i18next';
|
|
28
28
|
import '../../context/MockContext/MockContext.js';
|
|
29
29
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
30
30
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -59,14 +59,17 @@ import 'react-focus-lock';
|
|
|
59
59
|
|
|
60
60
|
const PendingConnectView = () => {
|
|
61
61
|
const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
|
|
62
|
+
const { t } = useTranslation();
|
|
62
63
|
const iconSize = 94;
|
|
63
64
|
const icon = (jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, style: {
|
|
64
65
|
height: pixelToRem(iconSize * iconRatio),
|
|
65
66
|
width: pixelToRem(iconSize * iconRatio),
|
|
66
67
|
} }));
|
|
67
|
-
return (jsxs("div", { className: 'pending-connect__container', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text',
|
|
68
|
-
? '
|
|
69
|
-
: '
|
|
68
|
+
return (jsxs("div", { className: 'pending-connect__container', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', copykey: isMobile()
|
|
69
|
+
? 'dyn_pending_connection.mobile'
|
|
70
|
+
: 'dyn_pending_connection.computer', children: isMobile()
|
|
71
|
+
? t('dyn_pending_connection.mobile')
|
|
72
|
+
: t('dyn_pending_connection.computer') })] }));
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
export { PendingConnectView };
|
|
@@ -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 walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
10
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
10
11
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
@@ -32,7 +33,6 @@ require('react-dom');
|
|
|
32
33
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
33
34
|
require('@dynamic-labs/types');
|
|
34
35
|
require('yup');
|
|
35
|
-
require('react-i18next');
|
|
36
36
|
require('../../context/MockContext/MockContext.cjs');
|
|
37
37
|
require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
38
38
|
require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -70,6 +70,7 @@ const PendingSignatureView = () => {
|
|
|
70
70
|
const [loading, setLoading] = React.useState(false);
|
|
71
71
|
const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
|
|
72
72
|
const { signAlreadyConnectedUser } = useConnectAndSignSplitSteps.useConnectAndSignSplitSteps();
|
|
73
|
+
const { t } = reactI18next.useTranslation();
|
|
73
74
|
const iconSize = 96;
|
|
74
75
|
/**
|
|
75
76
|
* The following check on Phantom+Ledger will be fixed in a future ticket.
|
|
@@ -95,12 +96,14 @@ const PendingSignatureView = () => {
|
|
|
95
96
|
width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
|
|
96
97
|
} }));
|
|
97
98
|
const typographyBodyCopy = isPhantomLedger
|
|
98
|
-
?
|
|
99
|
-
: '
|
|
100
|
-
return (jsxRuntime.jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy'),
|
|
99
|
+
? t('dyn_pending_signature.phantom_ledger_sign')
|
|
100
|
+
: t('dyn_pending_signature.regular_sign_description');
|
|
101
|
+
return (jsxRuntime.jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy'), copykey: isPhantomLedger
|
|
102
|
+
? 'dyn_pending_signature.phantom_ledger_sign'
|
|
103
|
+
: 'dyn_pending_signature.regular_sign_description', children: typographyBodyCopy }), isPhantomLedger && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', weight: 'regular', className: classNames.classNames('pending-signature__copy', 'pending-signature__copy--mini'), copykey: 'dyn_pending_signature.phantom_ledger_warning', children: [jsxRuntime.jsx("strong", { children: t('dyn_pending_signature.note') }), t('dyn_pending_signature.phantom_ledger_warning')] })), requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector) && (jsxRuntime.jsx(Button.Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
101
104
|
variant: 'button_primary',
|
|
102
105
|
weight: 'medium',
|
|
103
|
-
},
|
|
106
|
+
}, copykey: 'dyn_pending_signature.click_to_sign', children: t('dyn_pending_signature.click_to_sign') }))] }));
|
|
104
107
|
};
|
|
105
108
|
|
|
106
109
|
exports.PendingSignatureView = PendingSignatureView;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
4
5
|
import { PhantomLedgerWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
5
6
|
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
6
7
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
@@ -28,7 +29,6 @@ import 'react-dom';
|
|
|
28
29
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
29
30
|
import '@dynamic-labs/types';
|
|
30
31
|
import 'yup';
|
|
31
|
-
import 'react-i18next';
|
|
32
32
|
import '../../context/MockContext/MockContext.js';
|
|
33
33
|
import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
34
34
|
import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -66,6 +66,7 @@ const PendingSignatureView = () => {
|
|
|
66
66
|
const [loading, setLoading] = useState(false);
|
|
67
67
|
const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
|
|
68
68
|
const { signAlreadyConnectedUser } = useConnectAndSignSplitSteps();
|
|
69
|
+
const { t } = useTranslation();
|
|
69
70
|
const iconSize = 96;
|
|
70
71
|
/**
|
|
71
72
|
* The following check on Phantom+Ledger will be fixed in a future ticket.
|
|
@@ -91,12 +92,14 @@ const PendingSignatureView = () => {
|
|
|
91
92
|
width: pixelToRem(iconSize * iconRatio),
|
|
92
93
|
} }));
|
|
93
94
|
const typographyBodyCopy = isPhantomLedger
|
|
94
|
-
?
|
|
95
|
-
: '
|
|
96
|
-
return (jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('pending-signature__copy'),
|
|
95
|
+
? t('dyn_pending_signature.phantom_ledger_sign')
|
|
96
|
+
: t('dyn_pending_signature.regular_sign_description');
|
|
97
|
+
return (jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('pending-signature__copy'), copykey: isPhantomLedger
|
|
98
|
+
? 'dyn_pending_signature.phantom_ledger_sign'
|
|
99
|
+
: 'dyn_pending_signature.regular_sign_description', children: typographyBodyCopy }), isPhantomLedger && (jsxs(Typography, { variant: 'body_small', weight: 'regular', className: classNames('pending-signature__copy', 'pending-signature__copy--mini'), copykey: 'dyn_pending_signature.phantom_ledger_warning', children: [jsx("strong", { children: t('dyn_pending_signature.note') }), t('dyn_pending_signature.phantom_ledger_warning')] })), requiresTwoStepAuthentication(walletConnector) && (jsx(Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
|
|
97
100
|
variant: 'button_primary',
|
|
98
101
|
weight: 'medium',
|
|
99
|
-
},
|
|
102
|
+
}, copykey: 'dyn_pending_signature.click_to_sign', children: t('dyn_pending_signature.click_to_sign') }))] }));
|
|
100
103
|
};
|
|
101
104
|
|
|
102
105
|
export { PendingSignatureView };
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var reactI18next = require('react-i18next');
|
|
6
7
|
var MockedQrCode = require('../../../components/MockedQrCode/MockedQrCode.cjs');
|
|
7
8
|
require('@dynamic-labs/sdk-api');
|
|
8
9
|
require('../../../shared/logger.cjs');
|
|
@@ -32,7 +33,6 @@ require('react-dom');
|
|
|
32
33
|
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
33
34
|
require('@dynamic-labs/types');
|
|
34
35
|
require('yup');
|
|
35
|
-
require('react-i18next');
|
|
36
36
|
require('../../../context/MockContext/MockContext.cjs');
|
|
37
37
|
require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
38
38
|
require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
@@ -66,12 +66,15 @@ require('../../../components/Popper/Popper/Popper.cjs');
|
|
|
66
66
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
67
67
|
require('react-focus-lock');
|
|
68
68
|
|
|
69
|
-
const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => {
|
|
70
|
+
const { t } = reactI18next.useTranslation();
|
|
71
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('qrcode-container__container', {
|
|
72
|
+
'qrcode-container__container--message': showQrCodeMessage,
|
|
73
|
+
}), children: [jsxRuntime.jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
|
|
74
|
+
// this div exists to give the parent a child, so that the parent
|
|
75
|
+
// takes on its given width and height. the result is stable
|
|
76
|
+
// rendering of this component, without this there is a brief flash
|
|
77
|
+
jsxRuntime.jsx("div", {})), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxRuntime.jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsxRuntime.jsx(CopyButton.CopyButton, { textToCopy: qrcodeValue, copykey: 'dyn_qr_code.copy_button', children: jsxRuntime.jsxs("div", { className: 'button__content', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), t('dyn_qr_code.copy_button')] }) })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), t('dyn_qr_code.open_button', { wallet: walletName })] }))] }))] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title') })] }));
|
|
78
|
+
};
|
|
76
79
|
|
|
77
80
|
exports.QrCodeContainer = QrCodeContainer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { MockedQrCode } from '../../../components/MockedQrCode/MockedQrCode.js';
|
|
3
4
|
import '@dynamic-labs/sdk-api';
|
|
4
5
|
import '../../../shared/logger.js';
|
|
@@ -28,7 +29,6 @@ import 'react-dom';
|
|
|
28
29
|
import '../../../context/ThemeContext/ThemeContext.js';
|
|
29
30
|
import '@dynamic-labs/types';
|
|
30
31
|
import 'yup';
|
|
31
|
-
import 'react-i18next';
|
|
32
32
|
import '../../../context/MockContext/MockContext.js';
|
|
33
33
|
import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
34
34
|
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
@@ -62,12 +62,15 @@ import '../../../components/Popper/Popper/Popper.js';
|
|
|
62
62
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
63
63
|
import 'react-focus-lock';
|
|
64
64
|
|
|
65
|
-
const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => {
|
|
66
|
+
const { t } = useTranslation();
|
|
67
|
+
return (jsxs("div", { className: classNames('qrcode-container__container', {
|
|
68
|
+
'qrcode-container__container--message': showQrCodeMessage,
|
|
69
|
+
}), children: [jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsx(QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
|
|
70
|
+
// this div exists to give the parent a child, so that the parent
|
|
71
|
+
// takes on its given width and height. the result is stable
|
|
72
|
+
// rendering of this component, without this there is a brief flash
|
|
73
|
+
jsx("div", {})), jsx(MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsx(CopyButton, { textToCopy: qrcodeValue, copykey: 'dyn_qr_code.copy_button', children: jsxs("div", { className: 'button__content', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), t('dyn_qr_code.copy_button')] }) })), desktopUri && (jsxs(TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), t('dyn_qr_code.open_button', { wallet: walletName })] }))] }))] }), jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title') })] }));
|
|
74
|
+
};
|
|
72
75
|
|
|
73
76
|
export { QrCodeContainer };
|
|
@@ -111,7 +111,7 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
111
111
|
to: recipientAddress,
|
|
112
112
|
value,
|
|
113
113
|
};
|
|
114
|
-
return (jsxRuntime.jsx(TransactionStage.TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, title: t('dyn_send_transaction.confirmation.title'), onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, mutation: ({ to, value, gasPrice, nonce }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
114
|
+
return (jsxRuntime.jsx(TransactionStage.TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, copykey: 'dyn_send_transaction.confirmation.title', title: t('dyn_send_transaction.confirmation.title'), onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, mutation: ({ to, value, gasPrice, nonce }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
115
115
|
walletUiUtils.disabledConfirmationOnce();
|
|
116
116
|
const signer = yield walletConnector.getSigner();
|
|
117
117
|
const sentTransaction = yield signer.sendTransaction({
|
|
@@ -107,7 +107,7 @@ const SendBalanceView = ({ initialRecipientAddress = '', initialValue, onClickBa
|
|
|
107
107
|
to: recipientAddress,
|
|
108
108
|
value,
|
|
109
109
|
};
|
|
110
|
-
return (jsx(TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, title: t('dyn_send_transaction.confirmation.title'), onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, mutation: ({ to, value, gasPrice, nonce }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
110
|
+
return (jsx(TransactionStage, { walletConnector: walletConnector, provider: provider, transaction: transaction, copykey: 'dyn_send_transaction.confirmation.title', title: t('dyn_send_transaction.confirmation.title'), onClickBack: () => setStage('form'), onError: onError, displayPoweredByDynamicFooter: displayPoweredByDynamicFooter, mutation: ({ to, value, gasPrice, nonce }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
111
|
walletUiUtils.disabledConfirmationOnce();
|
|
112
112
|
const signer = yield walletConnector.getSigner();
|
|
113
113
|
const sentTransaction = yield signer.sendTransaction({
|
|
@@ -2,9 +2,10 @@ import { FC } from 'react';
|
|
|
2
2
|
import { Hex, TransactionRequest } from 'viem';
|
|
3
3
|
import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { TransactionConfirmationViewProps } from '../../../TransactionConfirmationView';
|
|
5
|
+
import { CopyKey } from '../../../../shared';
|
|
5
6
|
type TransactionStageProps = Omit<TransactionConfirmationViewProps, 'mutation'> & {
|
|
6
7
|
walletConnector: WalletConnector;
|
|
7
8
|
mutation: (transaction: TransactionRequest) => Promise<Hex>;
|
|
8
|
-
};
|
|
9
|
+
} & CopyKey;
|
|
9
10
|
export declare const TransactionStage: FC<TransactionStageProps>;
|
|
10
11
|
export {};
|
|
@@ -68,7 +68,7 @@ const SocialRedirectView = () => {
|
|
|
68
68
|
const { socialProvider, signInProvider } = SocialRedirectContext.useSocialRedirectContext();
|
|
69
69
|
const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
|
|
70
70
|
const { t } = reactI18next.useTranslation();
|
|
71
|
-
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-redirect-view__container'), children: [socialProvider && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { iconSize: 64, Icon: findSocialIcon(socialProvider), isSpinning: true })), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-redirect-view__title'), children: t('dyn_social_redirect.logging_in') }), signInProvider !== sdkApi.SignInProviderEnum.MagicLink && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'powered-by-dynamic' }))] }));
|
|
71
|
+
return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-redirect-view__container'), children: [socialProvider && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { iconSize: 64, Icon: findSocialIcon(socialProvider), isSpinning: true })), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-redirect-view__title'), copykey: 'dyn_social_redirect.logging_in', children: t('dyn_social_redirect.logging_in') }), signInProvider !== sdkApi.SignInProviderEnum.MagicLink && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'powered-by-dynamic' }))] }));
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
exports.SocialRedirectView = SocialRedirectView;
|