From be9ab9322f34846f3c5ec16fd0ba20945c9beeb0 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Fri, 6 Oct 2023 11:20:32 +0200 Subject: [PATCH] Properly close modals when naming accounts is disabled --- .../components/Toolbar/Features/Account/ManageableAccount.tsx | 3 +++ .../Toolbar/Features/Account/ManageableAccountEditModal.tsx | 4 +++- src/app/components/Toolbar/Features/AccountSelector/index.tsx | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/components/Toolbar/Features/Account/ManageableAccount.tsx b/src/app/components/Toolbar/Features/Account/ManageableAccount.tsx index e02105e073..1a974c7db0 100644 --- a/src/app/components/Toolbar/Features/Account/ManageableAccount.tsx +++ b/src/app/components/Toolbar/Features/Account/ManageableAccount.tsx @@ -4,11 +4,13 @@ import { ManageableAccountEditModal } from './ManageableAccountEditModal' import { Wallet } from '../../../../state/wallet/types' export const ManageableAccount = ({ + closeHandler, editHandler, wallet, isActive, onClick, }: { + closeHandler: () => any editHandler?: (name: string) => void wallet: Wallet isActive: boolean @@ -32,6 +34,7 @@ export const ManageableAccount = ({ /> {layerVisibility && ( setLayerVisibility(false)} editHandler={editHandler} wallet={wallet} diff --git a/src/app/components/Toolbar/Features/Account/ManageableAccountEditModal.tsx b/src/app/components/Toolbar/Features/Account/ManageableAccountEditModal.tsx index e288121ea4..8b25ea5c5b 100644 --- a/src/app/components/Toolbar/Features/Account/ManageableAccountEditModal.tsx +++ b/src/app/components/Toolbar/Features/Account/ManageableAccountEditModal.tsx @@ -23,11 +23,13 @@ interface FormValue { export const ManageableAccountEditModal = ({ animation, closeHandler, + closeParentHandler, editHandler, wallet, }: { animation?: boolean closeHandler: () => void + closeParentHandler?: () => void editHandler?: (name: string) => void wallet: Wallet }) => { @@ -74,7 +76,7 @@ export const ManageableAccountEditModal = ({