From 55d2b240e120561af26520cae533b076490d7490 Mon Sep 17 00:00:00 2001 From: Lance Chant <13349722+lancechant@users.noreply.github.com> Date: Tue, 9 Jun 2026 08:04:41 +0200 Subject: [PATCH] fix: an issue with save account didn't show the modal Fixed the modal to show now when save account is toggled on Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com> --- components/SaveAccountModal.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/SaveAccountModal.tsx b/components/SaveAccountModal.tsx index 42615c7d1..81508adef 100644 --- a/components/SaveAccountModal.tsx +++ b/components/SaveAccountModal.tsx @@ -69,17 +69,23 @@ export const SaveAccountModal: React.FC = ({ [isAndroid], ); + const isPresentedRef = useRef(false); + useEffect(() => { if (visible) { bottomSheetModalRef.current?.present(); - } else { + } else if (isPresentedRef.current) { bottomSheetModalRef.current?.dismiss(); + isPresentedRef.current = false; } }, [visible]); const handleSheetChanges = useCallback( (index: number) => { - if (index === -1) { + if (index >= 0) { + isPresentedRef.current = true; + } else if (index === -1 && isPresentedRef.current) { + isPresentedRef.current = false; resetState(); onClose(); }