Dont lower threshold if owner amount is the same as current threshold

This commit is contained in:
juampibermani 2021-06-07 12:04:03 -03:00
parent add406c42b
commit 27cf406181

View File

@ -40,7 +40,8 @@ export const ThresholdForm = ({ onClickBack, onClose, onSubmit, initialValues }:
const handleSubmit = (values) => { const handleSubmit = (values) => {
onSubmit(values) onSubmit(values)
} }
const defaultThreshold = threshold > 1 ? threshold - 1 : threshold const ownersAmount = owners?.size
const defaultThreshold = threshold > 1 && threshold === ownersAmount ? threshold - 1 : threshold
return ( return (
<> <>