From d6305df4f2dd10a00b56c794e64cc178dc94d22a Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Fri, 24 May 2024 00:43:34 +0100 Subject: [PATCH] fix: nostr receive target amount --- crates/cdk/src/wallet.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/cdk/src/wallet.rs b/crates/cdk/src/wallet.rs index 58d78d5c..ed371316 100644 --- a/crates/cdk/src/wallet.rs +++ b/crates/cdk/src/wallet.rs @@ -1195,7 +1195,11 @@ impl Wallet { #[cfg(feature = "nostr")] #[instrument(skip_all)] - pub async fn nostr_receive(&self, nostr_signing_key: SecretKey) -> Result { + pub async fn nostr_receive( + &self, + nostr_signing_key: SecretKey, + amount_split_target: Option, + ) -> Result { use nostr_sdk::{Keys, Kind}; let verifying_key = nostr_signing_key.public_key(); @@ -1241,7 +1245,12 @@ impl Wallet { let mut total_received = Amount::ZERO; for token in tokens.iter() { match self - .receive(token, Some(vec![nostr_signing_key.clone()]), None) + .receive( + token, + amount_split_target, + Some(vec![nostr_signing_key.clone()]), + None, + ) .await { Ok(amount) => total_received += amount,