@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
|
@@ -82,7 +82,7 @@ const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', in
|
|
|
82
82
|
}, [inlineControlsRef, variant, showAuthFlow, setShowDynamicUserProfile]);
|
|
83
83
|
index.useOnClickOutside(widgetRef, closeOnOutsideClick);
|
|
84
84
|
const showDynamicConnectButton = !useIsLoggedIn.useIsLoggedIn();
|
|
85
|
-
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(ShadowDOM.ShadowDOM, { className: 'dynamic-widget__container', id: 'dynamic-widget', children: showDynamicConnectButton ? (jsxRuntime.jsx(DynamicConnectButton.DynamicConnectButton, { buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, children: innerButtonComponent })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DynamicNav.DynamicNav, {}), jsxRuntime.jsx(DynamicUserProfile.DynamicUserProfile, { variant: variant })] })) }) }));
|
|
85
|
+
return (jsxRuntime.jsx(IsBrowser.IsBrowser, { children: jsxRuntime.jsx(ShadowDOM.ShadowDOM, { className: 'dynamic-widget__container', id: 'dynamic-widget', children: showDynamicConnectButton ? (jsxRuntime.jsx(DynamicConnectButton.DynamicConnectButton, { buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, copykey: 'dyn_widget.connect', children: innerButtonComponent })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DynamicNav.DynamicNav, {}), jsxRuntime.jsx(DynamicUserProfile.DynamicUserProfile, { variant: variant })] })) }) }));
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
exports.DynamicWidget = DynamicWidget;
|
|
@@ -78,7 +78,7 @@ const DynamicWidget = ({ buttonContainerClassName = '', buttonClassName = '', in
|
|
|
78
78
|
}, [inlineControlsRef, variant, showAuthFlow, setShowDynamicUserProfile]);
|
|
79
79
|
useOnClickOutside(widgetRef, closeOnOutsideClick);
|
|
80
80
|
const showDynamicConnectButton = !useIsLoggedIn();
|
|
81
|
-
return (jsx(IsBrowser, { children: jsx(ShadowDOM, { className: 'dynamic-widget__container', id: 'dynamic-widget', children: showDynamicConnectButton ? (jsx(DynamicConnectButton, { buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, children: innerButtonComponent })) : (jsxs(Fragment, { children: [jsx(DynamicNav, {}), jsx(DynamicUserProfile, { variant: variant })] })) }) }));
|
|
81
|
+
return (jsx(IsBrowser, { children: jsx(ShadowDOM, { className: 'dynamic-widget__container', id: 'dynamic-widget', children: showDynamicConnectButton ? (jsx(DynamicConnectButton, { buttonContainerClassName: buttonContainerClassName, buttonClassName: buttonClassName, copykey: 'dyn_widget.connect', children: innerButtonComponent })) : (jsxs(Fragment, { children: [jsx(DynamicNav, {}), jsx(DynamicUserProfile, { variant: variant })] })) }) }));
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
export { DynamicWidget };
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs
CHANGED
|
@@ -124,7 +124,7 @@ const ActiveWalletInformation = () => {
|
|
|
124
124
|
const showTestnetAlert = testnet && !isTurnkeyWalletWithoutAuthenticator;
|
|
125
125
|
return (jsxRuntime.jsxs("div", { className: 'active-wallet-information-container', "data-testid": 'active-wallet-information', children: [jsxRuntime.jsxs("div", { className: 'active-wallet-information', children: [jsxRuntime.jsxs("div", { className: 'active-wallet-information__header', children: [jsxRuntime.jsx("div", { className: 'active-wallet-information__avatar--centered', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("div", { className: 'active-wallet-information__avatar', children: jsxRuntime.jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) })) : (jsxRuntime.jsx("div", { className: 'active-wallet-information__wallet-img', children: jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: authToken, iconSize: ICON_SIZE, showStatus: true }) })) }), jsxRuntime.jsxs("div", { className: 'active-wallet-information__details', children: [jsxRuntime.jsxs("div", { className: classNames.classNames('active-wallet-information__actions-container', {
|
|
126
126
|
'active-wallet-information__actions-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
127
|
-
}), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', children: nameService === null || nameService === void 0 ? void 0 : nameService.name }), jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary', children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })] }), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] }), jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] })] }), showTestnetAlert && (jsxRuntime.jsx(Alert.Alert, { variant: 'warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), jsxRuntime.jsxs("div", { className: 'balance-container', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: "Balance" }), primaryWallet && (jsxRuntime.jsx(Balance.Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] })] }));
|
|
127
|
+
}), children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', children: nameService === null || nameService === void 0 ? void 0 : nameService.name }), jsxRuntime.jsx(Typography.Typography, { className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary', children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })] }), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] }), jsxRuntime.jsx(NetworkPicker.NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] })] }), showTestnetAlert && (jsxRuntime.jsx(Alert.Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), jsxRuntime.jsxs("div", { className: 'balance-container', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: "Balance" }), primaryWallet && (jsxRuntime.jsx(Balance.Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] })] }));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
exports.ActiveWalletInformation = ActiveWalletInformation;
|
package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js
CHANGED
|
@@ -120,7 +120,7 @@ const ActiveWalletInformation = () => {
|
|
|
120
120
|
const showTestnetAlert = testnet && !isTurnkeyWalletWithoutAuthenticator;
|
|
121
121
|
return (jsxs("div", { className: 'active-wallet-information-container', "data-testid": 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information', children: [jsxs("div", { className: 'active-wallet-information__header', children: [jsx("div", { className: 'active-wallet-information__avatar--centered', children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("div", { className: 'active-wallet-information__avatar', children: jsx("img", { src: nameService === null || nameService === void 0 ? void 0 : nameService.avatar, alt: '' }) })) : (jsx("div", { className: 'active-wallet-information__wallet-img', children: jsx(AuthProviderIcon, { jwt: authToken, iconSize: ICON_SIZE, showStatus: true }) })) }), jsxs("div", { className: 'active-wallet-information__details', children: [jsxs("div", { className: classNames('active-wallet-information__actions-container', {
|
|
122
122
|
'active-wallet-information__actions-container--centered': !(nameService === null || nameService === void 0 ? void 0 : nameService.name),
|
|
123
|
-
}), children: [jsxs("div", { children: [jsx(Typography, { className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', children: nameService === null || nameService === void 0 ? void 0 : nameService.name }), jsx(Typography, { className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary', children: shortenWalletAddress(address, 4, 4) })] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] }), jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] })] }), showTestnetAlert && (jsx(Alert, { variant: 'warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), jsxs("div", { className: 'balance-container', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: "Balance" }), primaryWallet && (jsx(Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] })] }));
|
|
123
|
+
}), children: [jsxs("div", { children: [jsx(Typography, { className: 'active-wallet-information__handle', color: 'primary', variant: 'body_normal', children: nameService === null || nameService === void 0 ? void 0 : nameService.name }), jsx(Typography, { className: 'active-wallet-information__address', weight: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'regular' : 'medium', variant: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'body_small' : 'body_normal', color: (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? 'secondary' : 'primary', children: shortenWalletAddress(address, 4, 4) })] }), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, buttonClassName: 'active-wallet-information__dots-menu', buttonClassNameWithOpenMenu: 'active-wallet-information__dots-menu' })] }), jsx(NetworkPicker, { currentNetwork: network, connector: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, mainClassName: 'active-wallet-information__network-picker', buttonClassName: 'active-wallet-information__network-picker-button', evmNetworks: evmNetworks, showNetworkName: true })] })] }), showTestnetAlert && (jsx(Alert, { variant: 'warning', copykey: 'dyn_active_wallet_info.testnet_warning', children: t('dyn_active_wallet_info.testnet_warning') }))] }), jsxs("div", { className: 'balance-container', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: "Balance" }), primaryWallet && (jsx(Balance, { className: 'balance-container__balance', connector: primaryWallet.connector, address: primaryWallet.address, network: network }))] })] }));
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
export { ActiveWalletInformation };
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs
CHANGED
|
@@ -68,10 +68,12 @@ const DynamicWidgetWallets = () => {
|
|
|
68
68
|
const { secondaryWallets, user, authMode } = useInternalDynamicContext.useInternalDynamicContext();
|
|
69
69
|
const { availableWalletsContainerRef } = DynamicWidgetContext.useWidgetContext();
|
|
70
70
|
const isEmpty = secondaryWallets.length === 0;
|
|
71
|
-
return (jsxRuntime.jsxs("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', children: t('dyn_widget.other_wallets') }), jsxRuntime.jsx("div", { className: classNames.classNames('dynamic-widget-wallets__body', {
|
|
71
|
+
return (jsxRuntime.jsxs("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: [jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsxRuntime.jsx("div", { className: classNames.classNames('dynamic-widget-wallets__body', {
|
|
72
72
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
73
|
-
}), children: isEmpty ? (jsxRuntime.jsx(EmptyWallets.EmptyWallets, { text: t('dyn_widget.empty_wallets', {
|
|
74
|
-
action: authMode === 'connect-and-sign'
|
|
73
|
+
}), children: isEmpty ? (jsxRuntime.jsx(EmptyWallets.EmptyWallets, { copykey: 'dyn_widget.empty_wallets', text: t('dyn_widget.empty_wallets', {
|
|
74
|
+
action: authMode === 'connect-and-sign'
|
|
75
|
+
? t('dyn_widget.empty_wallets_action_link')
|
|
76
|
+
: t('dyn_widget.empty_wallets_action_connect'),
|
|
75
77
|
}) })) : (jsxRuntime.jsx("div", { className: 'dynamic-widget-wallets__body__wallet-list', children: secondaryWallets.map((wallet, index) => {
|
|
76
78
|
var _a;
|
|
77
79
|
return (jsxRuntime.jsx(Wallet.Wallet, { ens: (_a = getWalletVerifiedCredential.getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id));
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js
CHANGED
|
@@ -64,10 +64,12 @@ const DynamicWidgetWallets = () => {
|
|
|
64
64
|
const { secondaryWallets, user, authMode } = useInternalDynamicContext();
|
|
65
65
|
const { availableWalletsContainerRef } = useWidgetContext();
|
|
66
66
|
const isEmpty = secondaryWallets.length === 0;
|
|
67
|
-
return (jsxs("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: [jsx(Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', children: t('dyn_widget.other_wallets') }), jsx("div", { className: classNames('dynamic-widget-wallets__body', {
|
|
67
|
+
return (jsxs("div", { ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets', children: [jsx(Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', className: 'dynamic-widget-wallets__title', copykey: 'dyn_widget.other_wallets', children: t('dyn_widget.other_wallets') }), jsx("div", { className: classNames('dynamic-widget-wallets__body', {
|
|
68
68
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
69
|
-
}), children: isEmpty ? (jsx(EmptyWallets, { text: t('dyn_widget.empty_wallets', {
|
|
70
|
-
action: authMode === 'connect-and-sign'
|
|
69
|
+
}), children: isEmpty ? (jsx(EmptyWallets, { copykey: 'dyn_widget.empty_wallets', text: t('dyn_widget.empty_wallets', {
|
|
70
|
+
action: authMode === 'connect-and-sign'
|
|
71
|
+
? t('dyn_widget.empty_wallets_action_link')
|
|
72
|
+
: t('dyn_widget.empty_wallets_action_connect'),
|
|
71
73
|
}) })) : (jsx("div", { className: 'dynamic-widget-wallets__body__wallet-list', children: secondaryWallets.map((wallet, index) => {
|
|
72
74
|
var _a;
|
|
73
75
|
return (jsx(Wallet, { ens: (_a = getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials, wallet.chain)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id));
|
|
@@ -63,13 +63,13 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
63
63
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
64
64
|
require('react-focus-lock');
|
|
65
65
|
|
|
66
|
-
const EmptyWallets = ({ text }) => {
|
|
66
|
+
const EmptyWallets = ({ text, copykey }) => {
|
|
67
67
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
|
|
68
68
|
return (jsxRuntime.jsxs("div", { className: classNames.classNames('empty-wallet__container', {
|
|
69
69
|
'empty-wallet__container--big': !isTurnkeyWalletWithoutAuthenticator,
|
|
70
70
|
}), children: [jsxRuntime.jsx(Icon.Icon, { className: 'empty-wallet__icon', size: 'medium', children: jsxRuntime.jsx(embeddedWalletIcon.ReactComponent, {}) }), jsxRuntime.jsx("div", { className: classNames.classNames({
|
|
71
71
|
'empty-wallet__text-container': !isTurnkeyWalletWithoutAuthenticator,
|
|
72
|
-
}), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: text }) })] }));
|
|
72
|
+
}), children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', copykey: copykey, children: text }) })] }));
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
exports.EmptyWallets = EmptyWallets;
|
|
@@ -59,13 +59,13 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
59
59
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
60
60
|
import 'react-focus-lock';
|
|
61
61
|
|
|
62
|
-
const EmptyWallets = ({ text }) => {
|
|
62
|
+
const EmptyWallets = ({ text, copykey }) => {
|
|
63
63
|
const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
|
|
64
64
|
return (jsxs("div", { className: classNames('empty-wallet__container', {
|
|
65
65
|
'empty-wallet__container--big': !isTurnkeyWalletWithoutAuthenticator,
|
|
66
66
|
}), children: [jsx(Icon, { className: 'empty-wallet__icon', size: 'medium', children: jsx(SvgEmbeddedWalletIcon, {}) }), jsx("div", { className: classNames({
|
|
67
67
|
'empty-wallet__text-container': !isTurnkeyWalletWithoutAuthenticator,
|
|
68
|
-
}), children: jsx(Typography, { variant: 'body_small', color: 'secondary', children: text }) })] }));
|
|
68
|
+
}), children: jsx(Typography, { variant: 'body_small', color: 'secondary', copykey: copykey, children: text }) })] }));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export { EmptyWallets };
|
|
@@ -4,42 +4,86 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
require('@dynamic-labs/utils');
|
|
8
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
9
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
10
|
+
require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
11
|
+
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
12
|
+
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
7
13
|
require('@dynamic-labs/sdk-api');
|
|
8
14
|
require('../../../../shared/logger.cjs');
|
|
9
15
|
require('@dynamic-labs/iconic');
|
|
10
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
11
16
|
require('react/jsx-runtime');
|
|
12
|
-
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
13
17
|
require('@dynamic-labs/wallet-book');
|
|
14
18
|
require('../../../../utils/constants/colors.cjs');
|
|
15
19
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
16
20
|
require('viem');
|
|
17
|
-
require('@dynamic-labs/utils');
|
|
18
21
|
require('../../../../shared/consts/index.cjs');
|
|
19
22
|
require('@dynamic-labs/multi-wallet');
|
|
20
23
|
var isWalletConnected = require('../../../../utils/functions/isWalletConnected/isWalletConnected.cjs');
|
|
24
|
+
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
25
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
26
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
27
|
+
require('../../../../context/EmailVerificationContext/EmailVerificationContext.cjs');
|
|
28
|
+
require('react-dom');
|
|
29
|
+
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
30
|
+
var usePromise = require('../../../../utils/hooks/usePromise/usePromise.cjs');
|
|
31
|
+
require('@dynamic-labs/types');
|
|
32
|
+
require('yup');
|
|
33
|
+
require('react-i18next');
|
|
34
|
+
require('../../../../context/MockContext/MockContext.cjs');
|
|
35
|
+
require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
|
|
36
|
+
require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
|
|
37
|
+
var useWalletConnectorEvent = require('../../../../utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.cjs');
|
|
38
|
+
require('@dynamic-labs/rpc-providers');
|
|
39
|
+
require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
40
|
+
require('../../../../components/Alert/Alert.cjs');
|
|
41
|
+
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
42
|
+
require('../../../../components/IconButton/IconButton.cjs');
|
|
43
|
+
require('../../../../components/InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
45
|
+
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
46
|
+
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
47
|
+
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
48
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
49
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
50
|
+
require('react-focus-lock');
|
|
51
|
+
require('formik');
|
|
52
|
+
require('i18next');
|
|
53
|
+
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
54
|
+
require('../../../../context/FooterAnimationContext/index.cjs');
|
|
55
|
+
require('../../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
56
|
+
require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
|
|
57
|
+
require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
58
|
+
require('qrcode');
|
|
59
|
+
require('../../../../context/LoadingContext/LoadingContext.cjs');
|
|
60
|
+
require('../../context/DynamicWidgetContext.cjs');
|
|
61
|
+
require('../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
62
|
+
require('@dynamic-labs/viem-utils');
|
|
63
|
+
require('../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
|
|
21
64
|
|
|
22
65
|
const useFetchBalance = ({ connector, chain, address, network, }) => {
|
|
23
66
|
const [balance, setBalance] = React.useState('0.0');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
chain,
|
|
33
|
-
connector,
|
|
34
|
-
});
|
|
35
|
-
/* istanbul ignore else */
|
|
36
|
-
if (isConnected) {
|
|
37
|
-
const value = yield connector.getBalance();
|
|
38
|
-
setBalance(value);
|
|
39
|
-
}
|
|
67
|
+
const isFetchBalanceDisabled = !chain || !address || (connector.supportsNetworkSwitching() && !network);
|
|
68
|
+
const fetchBalance = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
+
if (isFetchBalanceDisabled)
|
|
70
|
+
return;
|
|
71
|
+
const isConnected = yield isWalletConnected.isWalletConnected({
|
|
72
|
+
address,
|
|
73
|
+
chain,
|
|
74
|
+
connector,
|
|
40
75
|
});
|
|
41
|
-
|
|
42
|
-
|
|
76
|
+
/* istanbul ignore else */
|
|
77
|
+
if (isConnected) {
|
|
78
|
+
const value = yield connector.getBalance();
|
|
79
|
+
setBalance(value);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
usePromise.usePromise(fetchBalance, {
|
|
83
|
+
deps: [address, network === null || network === void 0 ? void 0 : network.toString(), chain],
|
|
84
|
+
enabled: !isFetchBalanceDisabled,
|
|
85
|
+
});
|
|
86
|
+
useWalletConnectorEvent.useWalletConnectorEvent(connector, 'accountChange', fetchBalance);
|
|
43
87
|
return [balance];
|
|
44
88
|
};
|
|
45
89
|
|
|
@@ -1,41 +1,85 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import '@dynamic-labs/utils';
|
|
4
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
5
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
6
|
+
import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
7
|
+
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
8
|
+
import '../../../../context/ViewContext/ViewContext.js';
|
|
3
9
|
import '@dynamic-labs/sdk-api';
|
|
4
10
|
import '../../../../shared/logger.js';
|
|
5
11
|
import '@dynamic-labs/iconic';
|
|
6
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
7
12
|
import 'react/jsx-runtime';
|
|
8
|
-
import '../../../../context/ViewContext/ViewContext.js';
|
|
9
13
|
import '@dynamic-labs/wallet-book';
|
|
10
14
|
import '../../../../utils/constants/colors.js';
|
|
11
15
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
12
16
|
import 'viem';
|
|
13
|
-
import '@dynamic-labs/utils';
|
|
14
17
|
import '../../../../shared/consts/index.js';
|
|
15
18
|
import '@dynamic-labs/multi-wallet';
|
|
16
19
|
import { isWalletConnected } from '../../../../utils/functions/isWalletConnected/isWalletConnected.js';
|
|
20
|
+
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
21
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
22
|
+
import '../../../../config/ApiEndpoint.js';
|
|
23
|
+
import '../../../../context/EmailVerificationContext/EmailVerificationContext.js';
|
|
24
|
+
import 'react-dom';
|
|
25
|
+
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
26
|
+
import { usePromise } from '../../../../utils/hooks/usePromise/usePromise.js';
|
|
27
|
+
import '@dynamic-labs/types';
|
|
28
|
+
import 'yup';
|
|
29
|
+
import 'react-i18next';
|
|
30
|
+
import '../../../../context/MockContext/MockContext.js';
|
|
31
|
+
import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
|
|
32
|
+
import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
33
|
+
import { useWalletConnectorEvent } from '../../../../utils/hooks/useWalletConnectorEvent/useWalletConnectorEvent.js';
|
|
34
|
+
import '@dynamic-labs/rpc-providers';
|
|
35
|
+
import '../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
36
|
+
import '../../../../components/Alert/Alert.js';
|
|
37
|
+
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
38
|
+
import '../../../../components/IconButton/IconButton.js';
|
|
39
|
+
import '../../../../components/InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
41
|
+
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
42
|
+
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
43
|
+
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
44
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
45
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
46
|
+
import 'react-focus-lock';
|
|
47
|
+
import 'formik';
|
|
48
|
+
import 'i18next';
|
|
49
|
+
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
50
|
+
import '../../../../context/FooterAnimationContext/index.js';
|
|
51
|
+
import '../../../../context/QrCodeContext/QrCodeContext.js';
|
|
52
|
+
import '../../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
53
|
+
import '../../components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
54
|
+
import 'qrcode';
|
|
55
|
+
import '../../../../context/LoadingContext/LoadingContext.js';
|
|
56
|
+
import '../../context/DynamicWidgetContext.js';
|
|
57
|
+
import '../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
58
|
+
import '@dynamic-labs/viem-utils';
|
|
59
|
+
import '../../views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
17
60
|
|
|
18
61
|
const useFetchBalance = ({ connector, chain, address, network, }) => {
|
|
19
62
|
const [balance, setBalance] = useState('0.0');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
chain,
|
|
29
|
-
connector,
|
|
30
|
-
});
|
|
31
|
-
/* istanbul ignore else */
|
|
32
|
-
if (isConnected) {
|
|
33
|
-
const value = yield connector.getBalance();
|
|
34
|
-
setBalance(value);
|
|
35
|
-
}
|
|
63
|
+
const isFetchBalanceDisabled = !chain || !address || (connector.supportsNetworkSwitching() && !network);
|
|
64
|
+
const fetchBalance = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
if (isFetchBalanceDisabled)
|
|
66
|
+
return;
|
|
67
|
+
const isConnected = yield isWalletConnected({
|
|
68
|
+
address,
|
|
69
|
+
chain,
|
|
70
|
+
connector,
|
|
36
71
|
});
|
|
37
|
-
|
|
38
|
-
|
|
72
|
+
/* istanbul ignore else */
|
|
73
|
+
if (isConnected) {
|
|
74
|
+
const value = yield connector.getBalance();
|
|
75
|
+
setBalance(value);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
usePromise(fetchBalance, {
|
|
79
|
+
deps: [address, network === null || network === void 0 ? void 0 : network.toString(), chain],
|
|
80
|
+
enabled: !isFetchBalanceDisabled,
|
|
81
|
+
});
|
|
82
|
+
useWalletConnectorEvent(connector, 'accountChange', fetchBalance);
|
|
39
83
|
return [balance];
|
|
40
84
|
};
|
|
41
85
|
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs
CHANGED
|
@@ -90,7 +90,7 @@ const ManagePasskeysWidgetView = () => {
|
|
|
90
90
|
});
|
|
91
91
|
const isRecoveryEnabled = Boolean(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.passkeyEmbeddedWalletRecoveryEnabled);
|
|
92
92
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
93
|
-
return (jsxRuntime.jsxs("div", { className: 'manage-passkeys-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', children: t('dyn_manage_passkeys.title') }) }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'manage-passkeys-widget-view__body', children: [jsxRuntime.jsx("div", { className: 'manage-passkeys-widget-view__body__cards', children: isLoading ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 1, className: 'manage-passkeys-widget-view__body__cards__skeleton' })) : (userPasskeys.map((passkey) => (jsxRuntime.jsx(PasskeyCard.PasskeyCard, { passkey: passkey }, passkey.id)))) }), isRecoveryEnabled && (jsxRuntime.jsx(Button.Button, { buttonPadding: 'large', buttonClassName: 'manage-passkeys-widget-view__body__recovery-button', onClick: initPasskeyRecoveryProcess, showInternalLoading: false, children: t('dyn_manage_passkeys.recovery_button') })), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {})] })] }));
|
|
93
|
+
return (jsxRuntime.jsxs("div", { className: 'manage-passkeys-widget-view', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_passkeys.title', children: t('dyn_manage_passkeys.title') }) }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'manage-passkeys-widget-view__body', children: [jsxRuntime.jsx("div", { className: 'manage-passkeys-widget-view__body__cards', children: isLoading ? (jsxRuntime.jsx(Skeleton.Skeleton, { count: 1, className: 'manage-passkeys-widget-view__body__cards__skeleton' })) : (userPasskeys.map((passkey) => (jsxRuntime.jsx(PasskeyCard.PasskeyCard, { passkey: passkey }, passkey.id)))) }), isRecoveryEnabled && (jsxRuntime.jsx(Button.Button, { buttonPadding: 'large', buttonClassName: 'manage-passkeys-widget-view__body__recovery-button', onClick: initPasskeyRecoveryProcess, showInternalLoading: false, copykey: 'dyn_manage_passkeys.recovery_button', children: t('dyn_manage_passkeys.recovery_button') })), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {})] })] }));
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
exports.ManagePasskeysWidgetView = ManagePasskeysWidgetView;
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js
CHANGED
|
@@ -86,7 +86,7 @@ const ManagePasskeysWidgetView = () => {
|
|
|
86
86
|
});
|
|
87
87
|
const isRecoveryEnabled = Boolean(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk.passkeyEmbeddedWalletRecoveryEnabled);
|
|
88
88
|
const backButton = (jsx(IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
89
|
-
return (jsxs("div", { className: 'manage-passkeys-widget-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', children: t('dyn_manage_passkeys.title') }) }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'manage-passkeys-widget-view__body', children: [jsx("div", { className: 'manage-passkeys-widget-view__body__cards', children: isLoading ? (jsx(Skeleton, { count: 1, className: 'manage-passkeys-widget-view__body__cards__skeleton' })) : (userPasskeys.map((passkey) => (jsx(PasskeyCard, { passkey: passkey }, passkey.id)))) }), isRecoveryEnabled && (jsx(Button, { buttonPadding: 'large', buttonClassName: 'manage-passkeys-widget-view__body__recovery-button', onClick: initPasskeyRecoveryProcess, showInternalLoading: false, children: t('dyn_manage_passkeys.recovery_button') })), jsx(NeedHelpSection, {})] })] }));
|
|
89
|
+
return (jsxs("div", { className: 'manage-passkeys-widget-view', children: [jsx(ModalHeader, { leading: backButton, children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_manage_passkeys.title', children: t('dyn_manage_passkeys.title') }) }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'manage-passkeys-widget-view__body', children: [jsx("div", { className: 'manage-passkeys-widget-view__body__cards', children: isLoading ? (jsx(Skeleton, { count: 1, className: 'manage-passkeys-widget-view__body__cards__skeleton' })) : (userPasskeys.map((passkey) => (jsx(PasskeyCard, { passkey: passkey }, passkey.id)))) }), isRecoveryEnabled && (jsx(Button, { buttonPadding: 'large', buttonClassName: 'manage-passkeys-widget-view__body__recovery-button', onClick: initPasskeyRecoveryProcess, showInternalLoading: false, copykey: 'dyn_manage_passkeys.recovery_button', children: t('dyn_manage_passkeys.recovery_button') })), jsx(NeedHelpSection, {})] })] }));
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
export { ManagePasskeysWidgetView };
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs
CHANGED
|
@@ -103,7 +103,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
103
103
|
cutStart: 4,
|
|
104
104
|
}), jsxRuntime.jsx("p", { className: classNames.classNames('passkey-card__info__tooltip', {
|
|
105
105
|
'passkey-card__info__tooltip--visible': showTooltip,
|
|
106
|
-
}), children: passkey.alias })] }), getPasskeyProviderName() && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_manage_passkeys.passkey_from'), " ", getPasskeyProviderName()] }))] })] }), jsxRuntime.jsx("div", { className: 'passkey-card__date', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_time_since.created'), ' ', `${timeSinceValue} ${timeSinceUnit} ${t('dyn_time_since.ago')}`] }) })] }));
|
|
106
|
+
}), children: passkey.alias })] }), getPasskeyProviderName() && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_manage_passkeys.passkey_from'), " ", getPasskeyProviderName()] }))] })] }), jsxRuntime.jsx("div", { className: 'passkey-card__date', children: jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_time_since.created', children: [t('dyn_time_since.created'), ' ', `${timeSinceValue} ${timeSinceUnit} ${t('dyn_time_since.ago')}`] }) })] }));
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
exports.PasskeyCard = PasskeyCard;
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js
CHANGED
|
@@ -99,7 +99,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
99
99
|
cutStart: 4,
|
|
100
100
|
}), jsx("p", { className: classNames('passkey-card__info__tooltip', {
|
|
101
101
|
'passkey-card__info__tooltip--visible': showTooltip,
|
|
102
|
-
}), children: passkey.alias })] }), getPasskeyProviderName() && (jsxs(Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_manage_passkeys.passkey_from'), " ", getPasskeyProviderName()] }))] })] }), jsx("div", { className: 'passkey-card__date', children: jsxs(Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_time_since.created'), ' ', `${timeSinceValue} ${timeSinceUnit} ${t('dyn_time_since.ago')}`] }) })] }));
|
|
102
|
+
}), children: passkey.alias })] }), getPasskeyProviderName() && (jsxs(Typography, { variant: 'body_small', color: 'secondary', children: [t('dyn_manage_passkeys.passkey_from'), " ", getPasskeyProviderName()] }))] })] }), jsx("div", { className: 'passkey-card__date', children: jsxs(Typography, { variant: 'body_small', color: 'secondary', copykey: 'dyn_time_since.created', children: [t('dyn_time_since.created'), ' ', `${timeSinceValue} ${timeSinceUnit} ${t('dyn_time_since.ago')}`] }) })] }));
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
export { PasskeyCard };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { useFetchNetworkConfigurations } from './useFetchNetworkConfigurations';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|