From c81028da818fd609a5606b82461cc8e6f2089082 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Mon, 11 Dec 2023 20:58:29 +0000 Subject: [PATCH] fix: into mint proof for check_spendable --- crates/cashu-sdk/src/client/minreq_client.rs | 1 - crates/cashu-sdk/src/wallet.rs | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/cashu-sdk/src/client/minreq_client.rs b/crates/cashu-sdk/src/client/minreq_client.rs index 4f2ec562..ba4fc442 100644 --- a/crates/cashu-sdk/src/client/minreq_client.rs +++ b/crates/cashu-sdk/src/client/minreq_client.rs @@ -18,7 +18,6 @@ use cashu::nuts::MintInfo; use cashu::nuts::*; use cashu::{Amount, Bolt11Invoice}; use serde_json::Value; -use tracing::debug; use url::Url; use super::join_url; diff --git a/crates/cashu-sdk/src/wallet.rs b/crates/cashu-sdk/src/wallet.rs index 6dc4884c..6ebcf8b8 100644 --- a/crates/cashu-sdk/src/wallet.rs +++ b/crates/cashu-sdk/src/wallet.rs @@ -76,8 +76,12 @@ impl Wallet { .partition(|(_, &b)| b); Ok(ProofsStatus { - spendable: spendable.into_iter().map(|(s, _)| s).cloned().collect(), - spent: spent.into_iter().map(|(s, _)| s).cloned().collect(), + spendable: spendable + .into_iter() + .map(|(s, _)| s.into()) + .cloned() + .collect(), + spent: spent.into_iter().map(|(s, _)| s.into()).cloned().collect(), }) } @@ -177,8 +181,6 @@ impl Wallet { /// Create Split Payload /// TODO: This needs to sort to avoid finer printing fn create_split(&self, amount: Option, proofs: Proofs) -> Result { - let proofs = proofs; - // Since split is used to get the needed combination of tokens for a specific // amount first blinded messages are created for the amount