From 018125d361adfb4706bf1949854fa824700899a8 Mon Sep 17 00:00:00 2001 From: mubarak23 Date: Sun, 10 Nov 2024 12:02:39 +0100 Subject: [PATCH] chore: formatting --- crates/cdk/src/wallet/keysets.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/cdk/src/wallet/keysets.rs b/crates/cdk/src/wallet/keysets.rs index d6fd5d20..7b7fb74e 100644 --- a/crates/cdk/src/wallet/keysets.rs +++ b/crates/cdk/src/wallet/keysets.rs @@ -44,14 +44,14 @@ impl Wallet { Ok(keysets.keysets) } - + /// Get active keyset for mint /// /// Queries mint for current keysets then gets [`Keys`] for any unknown /// keysets #[instrument(skip(self))] pub async fn get_active_mint_keysets(&self) -> Result, Error> { - let keysets = self.client.get_mint_keysets(self.mint_url.clone()).await?; + let keysets = self.client.get_mint_keysets(self.mint_url.clone()).await?; let keysets = keysets.keysets; self.localstore @@ -95,9 +95,12 @@ impl Wallet { /// keysets #[instrument(skip(self))] pub async fn get_active_mint_keyset(&self) -> Result { - let active_keysets = self.get_active_mint_keysets().await?; + let active_keysets = self.get_active_mint_keysets().await?; - let keyset_with_lowest_fee = active_keysets.into_iter().min_by_key(|key| key.input_fee_ppk).ok_or(Error::NoActiveKeysetWithLowestFee)?; + let keyset_with_lowest_fee = active_keysets + .into_iter() + .min_by_key(|key| key.input_fee_ppk) + .ok_or(Error::NoActiveKeysetWithLowestFee)?; Ok(keyset_with_lowest_fee) } }