diff --git a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx index 9e4630a83..f8d710ff2 100644 --- a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx +++ b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx @@ -20,10 +20,9 @@ interface Props { setDisplayPopup: React.Dispatch>; } -const Menus = ({ address, handleClose, setAnchorEl, setDisplayPopup }: { +const Menus = ({ address, handleClose, setDisplayPopup }: { address: string | undefined, handleClose: () => void, - setAnchorEl: React.Dispatch>, setDisplayPopup: React.Dispatch>, }) => { const { t } = useTranslation(); @@ -118,7 +117,7 @@ const Menus = ({ address, handleClose, setAnchorEl, setDisplayPopup }: { {hasPrivateKey && diff --git a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx index 4dd91e1d8..c3aa554e5 100644 --- a/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx +++ b/packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx @@ -13,7 +13,7 @@ import { updateMeta } from '../../../messaging'; interface Props { address: string | undefined; - setUpperAnchorEl?: React.Dispatch>; + closeParentMenu: () => void; } interface InputBoxProps { @@ -180,7 +180,7 @@ enum STATUS { SHOW_REMOVE } -function ProfileMenu ({ address, setUpperAnchorEl }: Props): React.ReactElement { +function ProfileMenu ({ address, closeParentMenu }: Props): React.ReactElement { const theme = useTheme(); const { t } = useTranslation(); const isExtensionMode = useIsExtensionPopup(); @@ -196,8 +196,8 @@ function ProfileMenu ({ address, setUpperAnchorEl }: Props): React.ReactElement< const handleClose = useCallback(() => { setAnchorEl(null); setShowName(false); - setUpperAnchorEl && setUpperAnchorEl(null); - }, [setUpperAnchorEl]); + closeParentMenu(); + }, [closeParentMenu]); const onAddClick = useCallback((event: React.MouseEvent) => { setAnchorEl(event.currentTarget); diff --git a/packages/extension-polkagate/src/partials/AccountMenu.tsx b/packages/extension-polkagate/src/partials/AccountMenu.tsx index 95a9aac78..238314d3f 100644 --- a/packages/extension-polkagate/src/partials/AccountMenu.tsx +++ b/packages/extension-polkagate/src/partials/AccountMenu.tsx @@ -135,6 +135,7 @@ function AccountMenu ({ address, isMenuOpen, noMargin, setShowMenu }: Props): Re {hasPrivateKey &&