diff --git a/crates/cashu-sdk/src/wallet/localstore/memory.rs b/crates/cashu-sdk/src/wallet/localstore/memory.rs index 1ffec618..21d75ff6 100644 --- a/crates/cashu-sdk/src/wallet/localstore/memory.rs +++ b/crates/cashu-sdk/src/wallet/localstore/memory.rs @@ -212,10 +212,7 @@ impl LocalStore for MemoryLocalStore { } async fn add_keyset_counter(&self, keyset_id: &Id, count: u64) -> Result<(), Error> { - self.keyset_counter - .lock() - .await - .insert(keyset_id.clone(), count); + self.keyset_counter.lock().await.insert(*keyset_id, count); Ok(()) } diff --git a/crates/cashu-sdk/src/wallet/mod.rs b/crates/cashu-sdk/src/wallet/mod.rs index 5f029a0c..cd7fdd14 100644 --- a/crates/cashu-sdk/src/wallet/mod.rs +++ b/crates/cashu-sdk/src/wallet/mod.rs @@ -69,7 +69,7 @@ impl Wallet { /// Back up seed pub fn mnemonic(&self) -> Option { - self.mnemonic.clone().map(|b| b) + self.mnemonic.clone() } pub async fn mint_balances(&self) -> Result, Error> { @@ -306,7 +306,7 @@ impl Wallet { PreMintSecrets::from_seed( active_keyset_id, count, - &mnemonic, + mnemonic, quote_info.amount, false, )? @@ -704,7 +704,7 @@ impl Wallet { .unwrap_or(0); counter = Some(count); - PreMintSecrets::from_seed(active_keyset_id, count, &mnemonic, proofs_amount, true)? + PreMintSecrets::from_seed(active_keyset_id, count, mnemonic, proofs_amount, true)? } None => PreMintSecrets::blank(active_keyset_id, proofs_amount)?, };