From b473d6311ffa869e26ec6ab8aa37eb652fb4c1b6 Mon Sep 17 00:00:00 2001 From: juampibermani Date: Mon, 7 Jun 2021 12:04:03 -0300 Subject: [PATCH] Dont lower threshold if owner amount is the same as current threshold --- .../RemoveOwnerModal/screens/ThresholdForm/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.tsx b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.tsx index 35ba5eea..cd1bc8d3 100644 --- a/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.tsx +++ b/src/routes/safe/components/Settings/ManageOwners/RemoveOwnerModal/screens/ThresholdForm/index.tsx @@ -39,7 +39,8 @@ export const ThresholdForm = ({ onClickBack, onClose, onSubmit, initialValues }: const handleSubmit = (values) => { onSubmit(values) } - const defaultThreshold = threshold > 1 ? threshold - 1 : threshold + const ownersAmount = owners?.size + const defaultThreshold = threshold > 1 && threshold === ownersAmount ? threshold - 1 : threshold return ( <>