From 61960b59e4b1798038a2d82c2c3fbfb5f7a90220 Mon Sep 17 00:00:00 2001 From: Milap Sheth Date: Tue, 11 Jun 2024 14:43:13 -0400 Subject: [PATCH] fix(axelar-gateway): prevent signer threshold from being zero --- move/axelar_gateway/sources/auth.move | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/move/axelar_gateway/sources/auth.move b/move/axelar_gateway/sources/auth.move index 9867ff11..b3b5c65a 100644 --- a/move/axelar_gateway/sources/auth.move +++ b/move/axelar_gateway/sources/auth.move @@ -200,7 +200,8 @@ module axelar_gateway::auth { previous_signer = current_signer; }; - assert!(total_weight >= signers.threshold(), EInvalidThreshold); + let threshold = signers.threshold(); + assert!(threshold != 0 && total_weight >= threshold, EInvalidThreshold); } fun update_rotation_timestamp(self: &mut AxelarSigners, clock: &Clock, enforce_rotation_delay: bool) {