diff --git a/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go b/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go index 630c18de..a70dceb6 100644 --- a/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go +++ b/backend/mpc-system/services/account/adapters/input/http/co_managed_handler.go @@ -499,10 +499,10 @@ func (h *CoManagedHTTPHandler) CreateSignSession(c *gin.Context) { return } - // Validate party count >= threshold + 1 - if len(req.Parties) < req.ThresholdT+1 { + // Validate party count == threshold_t (for t-of-n signing, exactly t parties are needed) + if len(req.Parties) != req.ThresholdT { c.JSON(http.StatusBadRequest, gin.H{ - "error": fmt.Sprintf("need at least %d parties for threshold %d", req.ThresholdT+1, req.ThresholdT), + "error": fmt.Sprintf("need exactly %d parties for threshold %d, got %d", req.ThresholdT, req.ThresholdT, len(req.Parties)), }) return }