Skip to content

Commit

Permalink
Merge pull request #1154 from MutinyWallet/max-fedi-invoice
Browse files Browse the repository at this point in the history
Remove max federation invoice amount
  • Loading branch information
TonyGiorgio authored Apr 22, 2024
2 parents 2d86ed8 + 9b970c8 commit 73710b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ use mockall::{automock, predicate::*};
pub const DEVICE_LOCK_INTERVAL_SECS: u64 = 30;
const BITCOIN_PRICE_CACHE_SEC: u64 = 300;
const DEFAULT_PAYMENT_TIMEOUT: u64 = 30;
const MAX_FEDERATION_INVOICE_AMT: u64 = 200_000;
const SWAP_LABEL: &str = "SWAP";
const MELT_CASHU_TOKEN: &str = "Cashu Token Melt";

Expand Down Expand Up @@ -1737,9 +1736,9 @@ impl<S: MutinyStorage> MutinyWallet<S> {
amount: u64,
labels: Vec<String>,
) -> Result<MutinyInvoice, MutinyError> {
// Attempt to create federation invoice if available and below max amount
// Attempt to create federation invoice if available
let federation_ids = self.list_federation_ids().await?;
if !federation_ids.is_empty() && amount <= MAX_FEDERATION_INVOICE_AMT {
if !federation_ids.is_empty() {
let federation_id = &federation_ids[0];
let fedimint_client = self.federations.read().await.get(federation_id).cloned();

Expand Down

0 comments on commit 73710b1

Please sign in to comment.