mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
fix: nostr receive target amount
This commit is contained in:
@@ -1195,7 +1195,11 @@ impl Wallet {
|
||||
|
||||
#[cfg(feature = "nostr")]
|
||||
#[instrument(skip_all)]
|
||||
pub async fn nostr_receive(&self, nostr_signing_key: SecretKey) -> Result<Amount, Error> {
|
||||
pub async fn nostr_receive(
|
||||
&self,
|
||||
nostr_signing_key: SecretKey,
|
||||
amount_split_target: Option<SplitTarget>,
|
||||
) -> Result<Amount, Error> {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user