mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-23 05:56:02 +01:00
feat: sig all cannot be used in melt
This commit is contained in:
@@ -59,6 +59,9 @@ pub enum Error {
|
||||
/// BlindMessage is already signed
|
||||
#[error("Blinded Message is already signed")]
|
||||
BlindedMessageAlreadySigned,
|
||||
/// Sig all cannot be used in melt
|
||||
#[error("Sig all cannot be used in melt")]
|
||||
SigAllUsedInMelt,
|
||||
/// Cashu Error
|
||||
#[error(transparent)]
|
||||
Cashu(#[from] crate::error::Error),
|
||||
|
||||
@@ -819,13 +819,10 @@ impl Mint {
|
||||
}
|
||||
|
||||
if let Some(outputs) = &melt_request.outputs {
|
||||
let (sig_flag, pubkeys) = enforce_sig_flag(melt_request.inputs.clone());
|
||||
let (sig_flag, _pubkeys) = enforce_sig_flag(melt_request.inputs.clone());
|
||||
|
||||
if sig_flag.eq(&SigFlag::SigAll) {
|
||||
let pubkeys = pubkeys.into_iter().collect();
|
||||
for blinded_messaage in outputs {
|
||||
blinded_messaage.verify_p2pk(&pubkeys, 1)?;
|
||||
}
|
||||
return Err(Error::SigAllUsedInMelt);
|
||||
}
|
||||
|
||||
let output_keysets_ids: HashSet<Id> = outputs.iter().map(|b| b.keyset_id).collect();
|
||||
|
||||
Reference in New Issue
Block a user