Skip to content

Commit

Permalink
zapper: temp remove pay_multi_invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Feb 16, 2024
1 parent 398b9fc commit 2ab328f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
4 changes: 3 additions & 1 deletion crates/nostr-sdk/src/client/zapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ impl Client {
.await?;

let zapper = self.zapper().await?;
zapper.pay_multi_invoices(invoices).await?;
for invoice in invoices.into_iter() {
zapper.pay_invoice(invoice).await?;
}
Ok(())
}

Expand Down
15 changes: 0 additions & 15 deletions crates/nostr-zapper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,6 @@ pub trait NostrZapper: AsyncTraitDeps {

/// Pay invoice
async fn pay_invoice(&self, invoice: String) -> Result<(), Self::Err>;

/// Pay multiple invoices
async fn pay_multi_invoices(&self, invoices: Vec<String>) -> Result<(), Self::Err> {
for invoice in invoices.into_iter() {
self.pay_invoice(invoice).await?;
}
Ok(())
}
}

#[repr(transparent)]
Expand All @@ -114,13 +106,6 @@ impl<T: NostrZapper> NostrZapper for EraseNostrZapperError<T> {
async fn pay_invoice(&self, invoice: String) -> Result<(), Self::Err> {
self.0.pay_invoice(invoice).await.map_err(Into::into)
}

async fn pay_multi_invoices(&self, invoices: Vec<String>) -> Result<(), Self::Err> {
self.0
.pay_multi_invoices(invoices)
.await
.map_err(Into::into)
}
}

/// Alias for `Send` on non-wasm, empty trait (implemented by everything) on
Expand Down

0 comments on commit 2ab328f

Please sign in to comment.