Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Feb 13, 2024
1 parent 8bd6751 commit 2e78dc0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions moksha-mint/src/lightning/alby.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use async_trait::async_trait;
use clap::Parser;
use hyper::{header::CONTENT_TYPE, http::HeaderValue};
use serde::{Deserialize, Serialize};
use tracing::info;
use url::Url;

use crate::{
Expand Down Expand Up @@ -191,14 +190,12 @@ impl AlbyClient {
.as_str()
.expect("payment_hash is empty")
.to_owned(),
total_fees: 0, // FIXME return fees for alby
total_fees: 0, // FIXME alby does not return fees at the moment
})
}

pub async fn is_invoice_paid(&self, payment_hash: &str) -> Result<bool, LightningError> {
info!("KODY checking if invoice is paid: {}", payment_hash);
let body = self.make_get(&format!("invoices/{payment_hash}")).await?;
info!("KODY body: {}", body);
Ok(serde_json::from_str::<serde_json::Value>(&body)?["settled"]
.as_bool()
.unwrap_or(false))
Expand Down

0 comments on commit 2e78dc0

Please sign in to comment.