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

Commit eb3848f

Browse files
Merge pull request #1195 from MutinyWallet/revert-fetch-meta
Don't fetch metadata for announced mints
2 parents 1894fa7 + 7c40c28 commit eb3848f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

mutiny-core/src/nostr/mod.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use bitcoin::{hashes::hex::FromHex, secp256k1::ThirtyTwoByteHash, Network};
2121
use fedimint_core::api::InviteCode;
2222
use fedimint_core::config::{ClientConfig, FederationId};
2323
use futures::{pin_mut, select, FutureExt};
24-
use futures_util::future::join_all;
2524
use futures_util::lock::Mutex;
2625
use lightning::util::logger::Logger;
2726
use lightning::{log_debug, log_error, log_info, log_warn};
@@ -2292,19 +2291,20 @@ impl<S: MutinyStorage, P: PrimalApi, C: NostrClient> NostrManager<S, P, C> {
22922291
mints.sort();
22932292

22942293
// try to get federation info from client config if not in event
2295-
let futures = mints
2296-
.iter_mut()
2297-
.map(|mint| mint.try_fetch_metadata())
2298-
.collect::<Vec<_>>();
2299-
join_all(futures).await;
2294+
// todo this currently retries which takes forever with bad mints, need to wait for next release of fedimint
2295+
// let futures = mints
2296+
// .iter_mut()
2297+
// .map(|mint| mint.try_fetch_metadata())
2298+
// .collect::<Vec<_>>();
2299+
// join_all(futures).await;
23002300

23012301
// remove mints that expire within the 30 days and ones we couldn't fetch metadata for
2302-
let days_30_from_now = utils::now() + Duration::from_secs(86_400 * 30);
2303-
mints.retain(|m| {
2304-
m.metadata.is_some()
2305-
&& (m.expire_timestamp.is_none()
2306-
|| m.expire_timestamp.unwrap() > days_30_from_now.as_secs())
2307-
});
2302+
// let days_30_from_now = utils::now() + Duration::from_secs(86_400 * 30);
2303+
// mints.retain(|m| {
2304+
// m.metadata.is_some()
2305+
// && (m.expire_timestamp.is_none()
2306+
// || m.expire_timestamp.unwrap() > days_30_from_now.as_secs())
2307+
// });
23082308

23092309
Ok(mints)
23102310
}

0 commit comments

Comments
 (0)