Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
refetch invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
elnosh committed Feb 12, 2024
1 parent e77b8b6 commit 3446201
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2209,7 +2209,7 @@ impl<S: MutinyStorage> MutinyWallet<S> {

let invoice_amount = token.proofs.total_amount() as f64 * (1.0 - 3.0 / 100.0);

let mutiny_invoice = self
let mut mutiny_invoice = self
.create_invoice(invoice_amount as u64, vec!["Cashu Token Melt".to_string()])
.await?;

Expand All @@ -2231,6 +2231,7 @@ impl<S: MutinyStorage> MutinyWallet<S> {
.await?;

if post_melt_bolt11_response.paid {
mutiny_invoice = self.get_invoice(&mutiny_invoice_str).await?;
invoices.push(mutiny_invoice);
}
}
Expand Down
3 changes: 1 addition & 2 deletions mutiny-wasm/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use bitcoin::Network;
use lightning_invoice::ParseOrSemanticError;
use log::error;
use moksha_core::error::MokshaCoreError;
use mutiny_core::error::{MutinyError, MutinyStorageError};
use thiserror::Error;
use wasm_bindgen::JsValue;
Expand Down Expand Up @@ -302,7 +301,7 @@ impl From<serde_json::error::Error> for MutinyJsError {

impl From<moksha_core::error::MokshaCoreError> for MutinyJsError {
fn from(e: moksha_core::error::MokshaCoreError) -> Self {
MokshaCoreError::from(e).into()
e.into()
}
}

Expand Down

0 comments on commit 3446201

Please sign in to comment.