We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8909a5 commit 97b65f7Copy full SHA for 97b65f7
1 file changed
web-client/src/multisig/commitment.rs
@@ -65,10 +65,13 @@ impl Commitment {
65
data: &[u8],
66
) -> Result<Commitment, JsError> {
67
let public_keys = PublicKey::unpack_public_keys(public_keys)?;
68
-
69
let commitment_groups = Commitment::unpack_commitments_list(commitment_groups)?;
70
71
- assert_eq!(public_keys.len(), commitment_groups.len());
+ if public_keys.len() != commitment_groups.len() {
+ return Err(JsError::new(
72
+ "The number of public keys must match the number of commitment groups",
73
+ ));
74
+ }
75
76
// Pack commitments into compile-time-known groups of MUSIG2_PARAMETER_V
77
let mut commitment_pairs: Vec<
0 commit comments