mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-19 12:05:38 +01:00
cashu-sdk chore: clippy
This commit is contained in:
@@ -58,7 +58,7 @@ impl Mint {
|
||||
/// Return a list of all supported keysets
|
||||
pub fn keysets(&self) -> nut02::Response {
|
||||
let mut keysets: HashSet<_> = self.inactive_keysets.keys().cloned().collect();
|
||||
keysets.insert(self.active_keyset.id.clone());
|
||||
keysets.insert(self.active_keyset.id);
|
||||
nut02::Response { keysets }
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ impl Mint {
|
||||
) {
|
||||
// Add current set to inactive keysets
|
||||
self.inactive_keysets
|
||||
.insert(self.active_keyset.id.clone(), self.active_keyset.clone());
|
||||
.insert(self.active_keyset.id, self.active_keyset.clone());
|
||||
|
||||
self.active_keyset = KeySet::generate(secret, derivation_path, max_order);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ impl Mint {
|
||||
fn blind_sign(&self, blinded_message: &BlindedMessage) -> Result<BlindedSignature, Error> {
|
||||
let BlindedMessage { amount, b } = blinded_message;
|
||||
|
||||
let Some(key_pair) = self.active_keyset.keys.0.get(&amount) else {
|
||||
let Some(key_pair) = self.active_keyset.keys.0.get(amount) else {
|
||||
// No key for amount
|
||||
return Err(Error::AmountKey);
|
||||
};
|
||||
@@ -117,7 +117,7 @@ impl Mint {
|
||||
Ok(BlindedSignature {
|
||||
amount: *amount,
|
||||
c: c.into(),
|
||||
id: self.active_keyset.id.clone(),
|
||||
id: self.active_keyset.id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ impl Wallet {
|
||||
|
||||
let unblinded_sig = unblind_message(blinded_c, rs[i].clone().into(), a).unwrap();
|
||||
let proof = Proof {
|
||||
id: Some(promise.id.clone()),
|
||||
id: Some(promise.id),
|
||||
amount: promise.amount,
|
||||
secret: secrets[i].clone(),
|
||||
c: unblinded_sig,
|
||||
|
||||
@@ -41,14 +41,14 @@ impl SplitRequest {
|
||||
pub struct SplitResponse {
|
||||
/// Promises to keep
|
||||
#[deprecated(
|
||||
since = "0.5.0",
|
||||
since = "0.3.0",
|
||||
note = "mint only response with one list of all promises"
|
||||
)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub fst: Option<Vec<BlindedSignature>>,
|
||||
/// Promises to send
|
||||
#[deprecated(
|
||||
since = "0.5.0",
|
||||
since = "0.3.0",
|
||||
note = "mint only response with one list of all promises"
|
||||
)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in New Issue
Block a user