@dynamic-labs/sdk-react-core 4.4.2 → 4.4.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 +20 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/Main.cjs +3 -3
- package/src/lib/Main.js +3 -3
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +2 -3
- package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +2 -3
- package/src/lib/components/HardwareWalletToggle/HardwareWalletToggle.cjs +12 -11
- package/src/lib/components/HardwareWalletToggle/HardwareWalletToggle.js +12 -11
- package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +2 -2
- package/src/lib/components/NeedHelpSection/NeedHelpSection.js +2 -2
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +2 -2
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +2 -2
- package/src/lib/components/Toggle/Toggle.cjs +1 -5
- package/src/lib/components/Toggle/Toggle.d.ts +6 -2
- package/src/lib/components/Toggle/Toggle.js +1 -5
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/utils.cjs +2 -2
- package/src/lib/components/TransactionConfirmationPageLayout/utils.d.ts +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/utils.js +2 -2
- package/src/lib/context/CaptchaContext/CaptchaContext.cjs +3 -3
- package/src/lib/context/CaptchaContext/CaptchaContext.js +3 -3
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +8 -2
- package/src/lib/context/MockContext/MockContext.cjs +0 -2
- package/src/lib/context/MockContext/MockContext.js +0 -2
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +5 -5
- package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +5 -5
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +8 -9
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +8 -9
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.cjs +8 -3
- package/src/lib/context/SocialRedirectContext/hooks/useRedirectSocialHandler/useRedirectSocialHandler.js +8 -3
- package/src/lib/context/ViewContext/ViewContext.cjs +0 -2
- package/src/lib/context/ViewContext/ViewContext.d.ts +0 -10
- package/src/lib/context/ViewContext/ViewContext.js +0 -2
- package/src/lib/context/ViewContext/types/index.d.ts +1 -2
- package/src/lib/context/WalletGroupContext/WalletGroupContext.cjs +3 -3
- package/src/lib/context/WalletGroupContext/WalletGroupContext.js +3 -3
- package/src/lib/data/api/exchangeRates/exchangeRates.cjs +9 -5
- package/src/lib/data/api/exchangeRates/exchangeRates.js +9 -5
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -6
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -6
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +4 -4
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +4 -4
- package/src/lib/store/internalImplementation/store.cjs +1 -0
- package/src/lib/store/internalImplementation/store.d.ts +5 -1
- package/src/lib/store/internalImplementation/store.js +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.cjs +4 -0
- package/src/lib/utils/functions/walletListBuilder/utils/groupWalletOptions/groupWalletOptions.js +4 -0
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +3 -3
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.d.ts +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +8 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +8 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +7 -7
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +7 -7
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +2 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +2 -2
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +5 -0
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +5 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +3 -3
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +3 -3
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.cjs +3 -3
- package/src/lib/utils/hooks/useDynamicModals/useDynamicModals.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +3 -3
- package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.cjs +2 -2
- package/src/lib/utils/hooks/useEmbeddedWalletAuthenticator/useEmbeddedWalletAuthenticator.js +2 -2
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +4 -4
- package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.cjs +28 -10
- package/src/lib/utils/hooks/useFunding/useConnectWalletForFunding/useConnectWalletForFunding.js +25 -7
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +6 -6
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +6 -6
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +2 -2
- package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +2 -2
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.cjs +12 -12
- package/src/lib/utils/hooks/useMfaModals/useMfaModals.js +12 -12
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +5 -7
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +5 -7
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +38 -24
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +3 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +38 -24
- package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.cjs +3 -3
- package/src/lib/utils/hooks/useSwitchNetwork/useSwitchNetwork.js +3 -3
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs +5 -5
- package/src/lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js +5 -5
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.cjs +5 -5
- package/src/lib/utils/hooks/useSyncOnboardingFlow/useSyncOnboardingFlow.js +5 -5
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +9 -9
- package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +9 -9
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +6 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +6 -6
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.cjs +12 -0
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.d.ts +7 -0
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/handleStoreVersionChanged.js +8 -0
- package/src/lib/utils/hooks/useValidateSession/handleStoreVersionChanged/index.d.ts +1 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +5 -3
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.d.ts +3 -1
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +5 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +12 -12
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +12 -12
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +8 -8
- package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +8 -8
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +14 -22
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.d.ts +6 -5
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +14 -22
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.cjs +3 -3
- package/src/lib/utils/hooks/useWalletOptions/useWalletOptions.js +3 -3
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +2 -2
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +2 -2
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.cjs +2 -2
- package/src/lib/views/CoinbaseMPCClaimIntro/CoinbaseMPCClaimIntro.js +2 -2
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +3 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +3 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +4 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +4 -4
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -2
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -2
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +4 -4
- package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +4 -4
- package/src/lib/views/LoginView/LoginView.cjs +2 -2
- package/src/lib/views/LoginView/LoginView.js +2 -2
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +4 -4
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +4 -4
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +3 -3
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +3 -3
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +5 -5
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +5 -5
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +3 -3
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.cjs +4 -4
- package/src/lib/views/MergeUserAccountsWithSameEmailView/MergeUserAccountsWithSameEmailView.js +4 -4
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +4 -9
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +4 -9
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.cjs +8 -10
- package/src/lib/views/MfaSecureDeviceView/MfaSecureDeviceView.js +8 -10
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +5 -5
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +5 -5
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -2
- package/src/lib/views/NoAccess/NoAccess.js +2 -2
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +2 -4
- package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +2 -4
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.cjs +2 -2
- package/src/lib/views/SandboxMaximumThresholdReached/SandboxMaximumThresholdReached.js +2 -2
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +2 -2
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +2 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -2
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +9 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +10 -5
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExternalWalletFunding/useStartExternalWalletFunding.cjs +0 -17
- package/src/lib/widgets/DynamicWidget/views/ChooseWalletFundingMethod/useFundingMethods/useStartExternalWalletFunding/useStartExternalWalletFunding.js +0 -17
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +4 -4
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManageMfaWidgetView/ManageMfaWidgetView.js +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
|
@@ -91,7 +91,7 @@ import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
|
91
91
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
92
92
|
|
|
93
93
|
const EditProfileView = () => {
|
|
94
|
-
const {
|
|
94
|
+
const { pushView } = useViewContext();
|
|
95
95
|
const { goToProfileView } = useDynamicBridgeWidgetContext();
|
|
96
96
|
const { setShowAuthFlow } = useInternalDynamicContext();
|
|
97
97
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
@@ -105,9 +105,9 @@ const EditProfileView = () => {
|
|
|
105
105
|
ignoreIfIsEmbeddedWidget: false,
|
|
106
106
|
performMultiWalletChecks: false,
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
pushView(isEmailVerificationRequired ? 'verify-email' : 'verify-sms');
|
|
109
109
|
}
|
|
110
|
-
}), [goToProfileView, setShowAuthFlow,
|
|
110
|
+
}), [goToProfileView, setShowAuthFlow, pushView, updateUser]);
|
|
111
111
|
return (jsx(UserProfileForm, { onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView }));
|
|
112
112
|
};
|
|
113
113
|
|
|
@@ -9,17 +9,22 @@ var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
|
9
9
|
var IconButton = require('../../../../components/IconButton/IconButton.cjs');
|
|
10
10
|
var Dropdown = require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
11
11
|
var DotsMenuDropdown = require('../DotsMenuDropdown/DotsMenuDropdown.cjs');
|
|
12
|
-
var index = require('../../../../shared/utils/hooks/useOnClickOutside/index.cjs');
|
|
13
12
|
var threeDots = require('../../../../shared/assets/three-dots.cjs');
|
|
14
13
|
require('@dynamic-labs/iconic');
|
|
15
14
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
16
15
|
|
|
17
16
|
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', iconOverride, }) => {
|
|
18
17
|
const dotsMenuRef = React.useRef(null);
|
|
19
|
-
const popperContentRef = React.useRef(null);
|
|
20
18
|
const [showMenu, setShowMenu] = React.useState(false);
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const handleIconClick = React.useCallback(() => {
|
|
20
|
+
// Use setTimeout here to prevent React 17 from triggering a click event
|
|
21
|
+
// when the dropdown is rendered.
|
|
22
|
+
setTimeout(() => setShowMenu(true), 0);
|
|
23
|
+
}, [setShowMenu]);
|
|
24
|
+
const handleMenuClose = React.useCallback(() => {
|
|
25
|
+
setShowMenu(false);
|
|
26
|
+
}, [setShowMenu]);
|
|
27
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(IconButton.IconButton, { ref: dotsMenuRef, onClick: handleIconClick, "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName, children: iconOverride ? (iconOverride) : (jsxRuntime.jsx(Icon.Icon, { children: jsxRuntime.jsx(threeDots.ReactComponent, {}) })) }), jsxRuntime.jsx(Dropdown.Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: dotsMenuRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right', children: jsxRuntime.jsx(DotsMenuDropdown.DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) })] }));
|
|
23
28
|
};
|
|
24
29
|
|
|
25
30
|
exports.DotsMenu = DotsMenu;
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
3
|
+
import { useRef, useState, useCallback } from 'react';
|
|
4
4
|
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
5
5
|
import { IconButton } from '../../../../components/IconButton/IconButton.js';
|
|
6
6
|
import { Dropdown } from '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
7
7
|
import { DotsMenuDropdown } from '../DotsMenuDropdown/DotsMenuDropdown.js';
|
|
8
|
-
import { useOnClickOutside } from '../../../../shared/utils/hooks/useOnClickOutside/index.js';
|
|
9
8
|
import { ReactComponent as SvgThreeDots } from '../../../../shared/assets/three-dots.js';
|
|
10
9
|
import '@dynamic-labs/iconic';
|
|
11
10
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
12
11
|
|
|
13
12
|
const DotsMenu = ({ options, buttonClassName, buttonClassNameWithOpenMenu, direction = 'right', iconOverride, }) => {
|
|
14
13
|
const dotsMenuRef = useRef(null);
|
|
15
|
-
const popperContentRef = useRef(null);
|
|
16
14
|
const [showMenu, setShowMenu] = useState(false);
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const handleIconClick = useCallback(() => {
|
|
16
|
+
// Use setTimeout here to prevent React 17 from triggering a click event
|
|
17
|
+
// when the dropdown is rendered.
|
|
18
|
+
setTimeout(() => setShowMenu(true), 0);
|
|
19
|
+
}, [setShowMenu]);
|
|
20
|
+
const handleMenuClose = useCallback(() => {
|
|
21
|
+
setShowMenu(false);
|
|
22
|
+
}, [setShowMenu]);
|
|
23
|
+
return (jsxs(Fragment, { children: [jsx(IconButton, { ref: dotsMenuRef, onClick: handleIconClick, "data-testid": 'dotsMenu', className: showMenu ? buttonClassNameWithOpenMenu : buttonClassName, children: iconOverride ? (iconOverride) : (jsx(Icon, { children: jsx(SvgThreeDots, {}) })) }), jsx(Dropdown, { isOpen: showMenu, onClickOutside: handleMenuClose, onScroll: handleMenuClose, anchorRef: dotsMenuRef, anchorOrigin: direction === 'right' ? 'bottom-left' : 'top-right', transformOrigin: direction === 'right' ? 'top-left' : 'bottom-right', children: jsx(DotsMenuDropdown, { options: options, setShowMenu: setShowMenu }) })] }));
|
|
19
24
|
};
|
|
20
25
|
|
|
21
26
|
export { DotsMenu };
|
|
@@ -5,33 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var _tslib = require('../../../../../../../../_virtual/_tslib.cjs');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var UserWalletsContext = require('../../../../../../context/UserWalletsContext/UserWalletsContext.cjs');
|
|
9
8
|
var projectSettings = require('../../../../../../store/state/projectSettings/projectSettings.cjs');
|
|
10
|
-
var walletOptions = require('../../../../../../store/state/walletOptions/walletOptions.cjs');
|
|
11
9
|
var useFunding = require('../../../../../../utils/hooks/useFunding/useFunding.cjs');
|
|
12
10
|
var DynamicWidgetContext = require('../../../../context/DynamicWidgetContext.cjs');
|
|
13
11
|
|
|
14
12
|
const useStartExternalWalletFunding = () => {
|
|
15
13
|
var _a, _b;
|
|
16
|
-
const userWallets = UserWalletsContext.useUserWallets();
|
|
17
14
|
const settings = projectSettings.useProjectSettings();
|
|
18
15
|
const { connectWalletForFunding } = useFunding.useFunding();
|
|
19
16
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
20
17
|
return React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
18
|
var _c, _d;
|
|
22
|
-
const hasWalletConnectWallet = userWallets.some((wallet) => wallet.connector.isWalletConnect);
|
|
23
|
-
// WC does not allow multiple sessions, so we have 2 cases here:
|
|
24
|
-
// 1. The user has a linked WalletConnect wallet.
|
|
25
|
-
// In this case, we should not do anything, and our logic will prevent other WCs from being
|
|
26
|
-
// selected for funding.
|
|
27
|
-
// 2. The user does not have a WalletConnect wallet linked.
|
|
28
|
-
// In this case, we should reset the WC session — this is because they might have just
|
|
29
|
-
// previously connected another WC wallet for funding and that session could still be active.
|
|
30
|
-
if (!hasWalletConnectWallet) {
|
|
31
|
-
const walletOption = walletOptions.getWalletConnectorOptions().find(({ walletConnector }) => walletConnector.isWalletConnect);
|
|
32
|
-
yield (walletOption === null || walletOption === void 0 ? void 0 : walletOption.walletConnector.endSession());
|
|
33
|
-
yield (walletOption === null || walletOption === void 0 ? void 0 : walletOption.walletConnector.init());
|
|
34
|
-
}
|
|
35
19
|
try {
|
|
36
20
|
const externalWallet = yield connectWalletForFunding();
|
|
37
21
|
const minAmount = (_d = (_c = settings === null || settings === void 0 ? void 0 : settings.sdk.funding) === null || _c === void 0 ? void 0 : _c.externalWallets) === null || _d === void 0 ? void 0 : _d.minAmount;
|
|
@@ -57,7 +41,6 @@ const useStartExternalWalletFunding = () => {
|
|
|
57
41
|
connectWalletForFunding,
|
|
58
42
|
setDynamicWidgetView,
|
|
59
43
|
(_b = (_a = settings === null || settings === void 0 ? void 0 : settings.sdk.funding) === null || _a === void 0 ? void 0 : _a.externalWallets) === null || _b === void 0 ? void 0 : _b.minAmount,
|
|
60
|
-
userWallets,
|
|
61
44
|
]);
|
|
62
45
|
};
|
|
63
46
|
|
|
@@ -1,33 +1,17 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { __awaiter } from '../../../../../../../../_virtual/_tslib.js';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
-
import { useUserWallets } from '../../../../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
5
4
|
import { useProjectSettings } from '../../../../../../store/state/projectSettings/projectSettings.js';
|
|
6
|
-
import { getWalletConnectorOptions } from '../../../../../../store/state/walletOptions/walletOptions.js';
|
|
7
5
|
import { useFunding } from '../../../../../../utils/hooks/useFunding/useFunding.js';
|
|
8
6
|
import { useWidgetContext } from '../../../../context/DynamicWidgetContext.js';
|
|
9
7
|
|
|
10
8
|
const useStartExternalWalletFunding = () => {
|
|
11
9
|
var _a, _b;
|
|
12
|
-
const userWallets = useUserWallets();
|
|
13
10
|
const settings = useProjectSettings();
|
|
14
11
|
const { connectWalletForFunding } = useFunding();
|
|
15
12
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
16
13
|
return useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
14
|
var _c, _d;
|
|
18
|
-
const hasWalletConnectWallet = userWallets.some((wallet) => wallet.connector.isWalletConnect);
|
|
19
|
-
// WC does not allow multiple sessions, so we have 2 cases here:
|
|
20
|
-
// 1. The user has a linked WalletConnect wallet.
|
|
21
|
-
// In this case, we should not do anything, and our logic will prevent other WCs from being
|
|
22
|
-
// selected for funding.
|
|
23
|
-
// 2. The user does not have a WalletConnect wallet linked.
|
|
24
|
-
// In this case, we should reset the WC session — this is because they might have just
|
|
25
|
-
// previously connected another WC wallet for funding and that session could still be active.
|
|
26
|
-
if (!hasWalletConnectWallet) {
|
|
27
|
-
const walletOption = getWalletConnectorOptions().find(({ walletConnector }) => walletConnector.isWalletConnect);
|
|
28
|
-
yield (walletOption === null || walletOption === void 0 ? void 0 : walletOption.walletConnector.endSession());
|
|
29
|
-
yield (walletOption === null || walletOption === void 0 ? void 0 : walletOption.walletConnector.init());
|
|
30
|
-
}
|
|
31
15
|
try {
|
|
32
16
|
const externalWallet = yield connectWalletForFunding();
|
|
33
17
|
const minAmount = (_d = (_c = settings === null || settings === void 0 ? void 0 : settings.sdk.funding) === null || _c === void 0 ? void 0 : _c.externalWallets) === null || _d === void 0 ? void 0 : _d.minAmount;
|
|
@@ -53,7 +37,6 @@ const useStartExternalWalletFunding = () => {
|
|
|
53
37
|
connectWalletForFunding,
|
|
54
38
|
setDynamicWidgetView,
|
|
55
39
|
(_b = (_a = settings === null || settings === void 0 ? void 0 : settings.sdk.funding) === null || _a === void 0 ? void 0 : _a.externalWallets) === null || _b === void 0 ? void 0 : _b.minAmount,
|
|
56
|
-
userWallets,
|
|
57
40
|
]);
|
|
58
41
|
};
|
|
59
42
|
|
|
@@ -96,7 +96,7 @@ require('../../../../components/Popper/Popper/Popper.cjs');
|
|
|
96
96
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
97
97
|
|
|
98
98
|
const EditProfileView = ({ rootClassName, }) => {
|
|
99
|
-
const {
|
|
99
|
+
const { pushView } = ViewContext.useViewContext();
|
|
100
100
|
const { setShowAuthFlow, multiWallet, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
101
101
|
const { goToProfileView } = DynamicWidgetContext.useWidgetContext();
|
|
102
102
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
@@ -111,9 +111,9 @@ const EditProfileView = ({ rootClassName, }) => {
|
|
|
111
111
|
initializeWalletConnect: false,
|
|
112
112
|
performMultiWalletChecks: false,
|
|
113
113
|
});
|
|
114
|
-
|
|
114
|
+
pushView(isEmailVerificationRequired ? 'verify-email' : 'verify-sms');
|
|
115
115
|
}
|
|
116
|
-
}), [goToProfileView, setShowAuthFlow,
|
|
116
|
+
}), [goToProfileView, setShowAuthFlow, pushView, updateUser]);
|
|
117
117
|
const isKYCEnabled = useKYCFlag.useKYCFlag();
|
|
118
118
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!multiWallet && isKYCEnabled && (jsxRuntime.jsx(Typography.Typography, { weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title', children: "My information" })), jsxRuntime.jsx(UserProfileForm.UserProfileForm, { formClassName: rootClassName, onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView })] }));
|
|
119
119
|
};
|
|
@@ -92,7 +92,7 @@ import '../../../../components/Popper/Popper/Popper.js';
|
|
|
92
92
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
93
93
|
|
|
94
94
|
const EditProfileView = ({ rootClassName, }) => {
|
|
95
|
-
const {
|
|
95
|
+
const { pushView } = useViewContext();
|
|
96
96
|
const { setShowAuthFlow, multiWallet, user } = useInternalDynamicContext();
|
|
97
97
|
const { goToProfileView } = useWidgetContext();
|
|
98
98
|
const { updateUser } = useUserUpdateRequestInternal({
|
|
@@ -107,9 +107,9 @@ const EditProfileView = ({ rootClassName, }) => {
|
|
|
107
107
|
initializeWalletConnect: false,
|
|
108
108
|
performMultiWalletChecks: false,
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
pushView(isEmailVerificationRequired ? 'verify-email' : 'verify-sms');
|
|
111
111
|
}
|
|
112
|
-
}), [goToProfileView, setShowAuthFlow,
|
|
112
|
+
}), [goToProfileView, setShowAuthFlow, pushView, updateUser]);
|
|
113
113
|
const isKYCEnabled = useKYCFlag();
|
|
114
114
|
return (jsxs(Fragment, { children: [!multiWallet && isKYCEnabled && (jsx(Typography, { weight: 'regular', color: 'secondary', variant: 'body_normal', className: 'dynamic-widget-edit-profile-view__profile-title', children: "My information" })), jsx(UserProfileForm, { formClassName: rootClassName, onEditProfileSubmit: onEditProfileFormSubmit, onEditProfileCancel: goToProfileView })] }));
|
|
115
115
|
};
|
|
@@ -103,7 +103,7 @@ const GlobalWalletView = () => {
|
|
|
103
103
|
var _a;
|
|
104
104
|
const { t } = reactI18next.useTranslation();
|
|
105
105
|
const { setDynamicWidgetView, goToInitialDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
106
|
-
const {
|
|
106
|
+
const { pushView } = ViewContext.useViewContext();
|
|
107
107
|
const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
108
108
|
const { primaryWallet } = useDynamicContext.useDynamicContext();
|
|
109
109
|
const [walletConnectUri, setWalletConnectUri] = React.useState('');
|
|
@@ -125,7 +125,7 @@ const GlobalWalletView = () => {
|
|
|
125
125
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126
126
|
[]);
|
|
127
127
|
const handleConfirmView = (pairingInfo) => {
|
|
128
|
-
|
|
128
|
+
pushView('global-wallet-confirm', {
|
|
129
129
|
onCancel: () => {
|
|
130
130
|
setDynamicWidgetView('global-wallet');
|
|
131
131
|
setShowAuthFlow(false, {
|
|
@@ -166,7 +166,7 @@ const GlobalWalletView = () => {
|
|
|
166
166
|
const pairingInfo = { icons, name, url };
|
|
167
167
|
const isDefinitelyMalicious = yield blockaid.isMaliciousUrl({ environmentId, url });
|
|
168
168
|
if (isDefinitelyMalicious || isDefinitelyMalicious === undefined) {
|
|
169
|
-
|
|
169
|
+
pushView('global-wallet-malicious', {
|
|
170
170
|
maliciousSiteInfo: {
|
|
171
171
|
isDefinitelyMalicious: isDefinitelyMalicious !== null && isDefinitelyMalicious !== void 0 ? isDefinitelyMalicious : false,
|
|
172
172
|
proceedFlow: () => handleConfirmView(pairingInfo),
|
|
@@ -222,7 +222,7 @@ const GlobalWalletView = () => {
|
|
|
222
222
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
223
223
|
}, [walletConnectUri]);
|
|
224
224
|
const renderHeader = () => (jsxRuntime.jsxs("div", { className: 'header', children: [jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', weight: 'medium', color: 'primary', as: 'h1', copykey: 'global_wallet.connect_to_apps', children: t('global_wallet.connect_to_apps') }), utils.isMobile() && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => {
|
|
225
|
-
|
|
225
|
+
pushView('global-wallet-info');
|
|
226
226
|
setShowAuthFlow(true, {
|
|
227
227
|
ignoreIfIsEmbeddedWidget: false,
|
|
228
228
|
performMultiWalletChecks: false,
|
|
@@ -99,7 +99,7 @@ const GlobalWalletView = () => {
|
|
|
99
99
|
var _a;
|
|
100
100
|
const { t } = useTranslation();
|
|
101
101
|
const { setDynamicWidgetView, goToInitialDynamicWidgetView } = useWidgetContext();
|
|
102
|
-
const {
|
|
102
|
+
const { pushView } = useViewContext();
|
|
103
103
|
const { setShowAuthFlow } = useInternalDynamicContext();
|
|
104
104
|
const { primaryWallet } = useDynamicContext();
|
|
105
105
|
const [walletConnectUri, setWalletConnectUri] = useState('');
|
|
@@ -121,7 +121,7 @@ const GlobalWalletView = () => {
|
|
|
121
121
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
122
|
[]);
|
|
123
123
|
const handleConfirmView = (pairingInfo) => {
|
|
124
|
-
|
|
124
|
+
pushView('global-wallet-confirm', {
|
|
125
125
|
onCancel: () => {
|
|
126
126
|
setDynamicWidgetView('global-wallet');
|
|
127
127
|
setShowAuthFlow(false, {
|
|
@@ -162,7 +162,7 @@ const GlobalWalletView = () => {
|
|
|
162
162
|
const pairingInfo = { icons, name, url };
|
|
163
163
|
const isDefinitelyMalicious = yield isMaliciousUrl({ environmentId, url });
|
|
164
164
|
if (isDefinitelyMalicious || isDefinitelyMalicious === undefined) {
|
|
165
|
-
|
|
165
|
+
pushView('global-wallet-malicious', {
|
|
166
166
|
maliciousSiteInfo: {
|
|
167
167
|
isDefinitelyMalicious: isDefinitelyMalicious !== null && isDefinitelyMalicious !== void 0 ? isDefinitelyMalicious : false,
|
|
168
168
|
proceedFlow: () => handleConfirmView(pairingInfo),
|
|
@@ -218,7 +218,7 @@ const GlobalWalletView = () => {
|
|
|
218
218
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
219
219
|
}, [walletConnectUri]);
|
|
220
220
|
const renderHeader = () => (jsxs("div", { className: 'header', children: [jsx(IconButton, { type: 'button', onClick: goToInitialDynamicWidgetView, "data-testid": 'back-button', children: jsx(SvgArrowLeft, {}) }), jsx(Typography, { variant: 'title', weight: 'medium', color: 'primary', as: 'h1', copykey: 'global_wallet.connect_to_apps', children: t('global_wallet.connect_to_apps') }), isMobile() && (jsx(IconButton, { type: 'button', onClick: () => {
|
|
221
|
-
|
|
221
|
+
pushView('global-wallet-info');
|
|
222
222
|
setShowAuthFlow(true, {
|
|
223
223
|
ignoreIfIsEmbeddedWidget: false,
|
|
224
224
|
performMultiWalletChecks: false,
|
|
@@ -110,7 +110,7 @@ const ManageMfaWidgetView = () => {
|
|
|
110
110
|
const [loading, setLoading] = React.useState(false);
|
|
111
111
|
const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
|
|
112
112
|
const { setShowMfaQRCode, setShowOTPVerification } = useDynamicModals.useDynamicModals();
|
|
113
|
-
const {
|
|
113
|
+
const { pushView } = ViewContext.useViewContext();
|
|
114
114
|
const { getUserDevices, deleteUserDevice } = useMfa.useMfa();
|
|
115
115
|
const { t } = reactI18next.useTranslation();
|
|
116
116
|
const { projectSettings, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -145,7 +145,7 @@ const ManageMfaWidgetView = () => {
|
|
|
145
145
|
const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
|
|
146
146
|
const handleGenerateBackupCodes = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
147
147
|
setShowAuthFlow(true);
|
|
148
|
-
|
|
148
|
+
pushView('mfa-display-backup-codes', { regenerateCodes: true });
|
|
149
149
|
});
|
|
150
150
|
return (jsxRuntime.jsxs("div", { className: 'manage-mfa-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_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxRuntime.jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [loading && jsxRuntime.jsx(MfaDeviceTileSkeleton.MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsxRuntime.jsx(Typography.Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsxRuntime.jsx(UserDeviceTile.UserDeviceTile, { isMfaRequired: isMfaRequired, userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsxRuntime.jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: userDevices.length > 0 ? (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: handleGenerateBackupCodes, copykey: 'dyn_manage_mfa.generate_backup_codes_button', children: t('dyn_manage_mfa.generate_backup_codes_button') })) : (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsxRuntime.jsx(add.ReactComponent, {}), children: t('dyn_manage_mfa.add_mfa_button') })) })] }));
|
|
151
151
|
};
|
|
@@ -106,7 +106,7 @@ const ManageMfaWidgetView = () => {
|
|
|
106
106
|
const [loading, setLoading] = useState(false);
|
|
107
107
|
const { setDynamicWidgetView } = useWidgetContext();
|
|
108
108
|
const { setShowMfaQRCode, setShowOTPVerification } = useDynamicModals();
|
|
109
|
-
const {
|
|
109
|
+
const { pushView } = useViewContext();
|
|
110
110
|
const { getUserDevices, deleteUserDevice } = useMfa();
|
|
111
111
|
const { t } = useTranslation();
|
|
112
112
|
const { projectSettings, setShowAuthFlow } = useInternalDynamicContext();
|
|
@@ -141,7 +141,7 @@ const ManageMfaWidgetView = () => {
|
|
|
141
141
|
const backButton = (jsx(IconButton, { type: 'button', onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
|
|
142
142
|
const handleGenerateBackupCodes = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
143
|
setShowAuthFlow(true);
|
|
144
|
-
|
|
144
|
+
pushView('mfa-display-backup-codes', { regenerateCodes: true });
|
|
145
145
|
});
|
|
146
146
|
return (jsxs("div", { className: 'manage-mfa-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_mfa.title', children: t('dyn_manage_mfa.title') }) }) }), jsxs("div", { className: 'manage-mfa-widget-view__scroll-container', children: [loading && jsx(MfaDeviceTileSkeleton, {}), !loading && userDevices.length === 0 && (jsx(Typography, { className: 'manage-mfa-widget-view__no-devices', variant: 'body_normal', color: 'secondary', copykey: 'dyn_manage_mfa.no_devices', children: t('dyn_manage_mfa.no_devices') })), userDevices.map((device, index) => (jsx(UserDeviceTile, { isMfaRequired: isMfaRequired, userDevice: device, index: index, deleteDevice: deleteDevice }, device.id)))] }), jsx("div", { className: 'manage-mfa-widget-view__add-mfa-button-container', children: userDevices.length > 0 ? (jsx(TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: handleGenerateBackupCodes, copykey: 'dyn_manage_mfa.generate_backup_codes_button', children: t('dyn_manage_mfa.generate_backup_codes_button') })) : (jsx(TypographyButton, { buttonClassName: 'manage-mfa-widget-view__add-mfa-button-container__button', onClick: () => setShowMfaQRCode(true), copykey: 'dyn_manage_mfa.add_mfa_button', startSlot: jsx(SvgAdd, {}), children: t('dyn_manage_mfa.add_mfa_button') })) })] }));
|
|
147
147
|
};
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs
CHANGED
|
@@ -110,7 +110,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
110
110
|
var _a;
|
|
111
111
|
const { t } = reactI18next.useTranslation();
|
|
112
112
|
const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
113
|
-
const {
|
|
113
|
+
const { pushView } = ViewContext.useViewContext();
|
|
114
114
|
const { setPasskey, setPasskeyIcon } = PasskeyContext.usePasskeyContext();
|
|
115
115
|
const menuOptions = [
|
|
116
116
|
{
|
|
@@ -119,7 +119,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
119
119
|
setShowAuthFlow(true);
|
|
120
120
|
setPasskey(passkey);
|
|
121
121
|
setPasskeyIcon(() => { var _a; return (_a = PasskeyProviderIcon()) !== null && _a !== void 0 ? _a : undefined; });
|
|
122
|
-
|
|
122
|
+
pushView('rename-passkey');
|
|
123
123
|
},
|
|
124
124
|
text: 'Rename',
|
|
125
125
|
},
|
package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js
CHANGED
|
@@ -106,7 +106,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
106
106
|
var _a;
|
|
107
107
|
const { t } = useTranslation();
|
|
108
108
|
const { setShowAuthFlow } = useInternalDynamicContext();
|
|
109
|
-
const {
|
|
109
|
+
const { pushView } = useViewContext();
|
|
110
110
|
const { setPasskey, setPasskeyIcon } = usePasskeyContext();
|
|
111
111
|
const menuOptions = [
|
|
112
112
|
{
|
|
@@ -115,7 +115,7 @@ const PasskeyCard = ({ passkey }) => {
|
|
|
115
115
|
setShowAuthFlow(true);
|
|
116
116
|
setPasskey(passkey);
|
|
117
117
|
setPasskeyIcon(() => { var _a; return (_a = PasskeyProviderIcon()) !== null && _a !== void 0 ? _a : undefined; });
|
|
118
|
-
|
|
118
|
+
pushView('rename-passkey');
|
|
119
119
|
},
|
|
120
120
|
text: 'Rename',
|
|
121
121
|
},
|