Skip to content

Commit 962b78c

Browse files
Merge branch 'HSM-1460'
2 parents 038601c + 946bbc2 commit 962b78c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/wasm-mps/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ mod mps {
244244
fn internal_dkg_round2_process<G>(
245245
round2_messages: &[Vec<u8>; 2],
246246
state: &[u8],
247-
) -> Result<(Keyshare<G>, G), MpsError>
247+
) -> Result<Keyshare<G>, MpsError>
248248
where
249249
G: GroupElem + Serialize + for<'de> Deserialize<'de>,
250250
G::Scalar: ScalarReduce<[u8; 32]> + Serializable,
@@ -265,7 +265,7 @@ mod mps {
265265
.process(vec![i0_msg2, i1_msg2, state.msg.clone()])
266266
.map_err(|_| MpsError::ProtocolError)?;
267267

268-
Ok((share.clone(), share.public_key))
268+
Ok(share)
269269
}
270270

271271
/// Process round 2 of DKG protocol.
@@ -275,10 +275,10 @@ mod mps {
275275
round2_messages: &[Vec<u8>; 2],
276276
state: &[u8],
277277
) -> Result<Share, MpsError> {
278-
let (share, pk) = internal_dkg_round2_process::<EdwardsPoint>(round2_messages, state)?;
278+
let share = internal_dkg_round2_process::<EdwardsPoint>(round2_messages, state)?;
279279
Ok(Share {
280280
share: bincode::serialize(&share).map_err(|_| MpsError::SerializationError)?,
281-
pk: pk.compress().to_bytes(),
281+
pk: share.public_key.compress().to_bytes(),
282282
})
283283
}
284284

0 commit comments

Comments
 (0)