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

Don't block on gateway fees #1226

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions mutiny-core/src/federation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ pub struct FederationIdentity {
pub federation_name: Option<String>,
pub federation_expiry_timestamp: Option<String>,
pub welcome_message: Option<String>,
pub gateway_fees: Option<GatewayFees>,
// undocumented parameters that fedi uses: https://meta.dev.fedibtc.com/meta.json
pub federation_icon_url: Option<String>,
pub meta_external_url: Option<String>,
Expand Down Expand Up @@ -873,12 +872,10 @@ impl<S: MutinyStorage> FederationClient<S> {
}

pub async fn get_mutiny_federation_identity(&self) -> FederationIdentity {
let gateway_fees = self.gateway_fee().await.ok();
get_federation_identity(
self.uuid.clone(),
self.fedimint_client.clone(),
self.invite_code.clone(),
gateway_fees,
self.logger.clone(),
)
.await
Expand All @@ -895,8 +892,6 @@ pub(crate) async fn get_federation_identity(
uuid: String,
fedimint_client: ClientHandleArc,
invite_code: InviteCode,
gateway_fees: Option<GatewayFees>,

logger: Arc<MutinyLogger>,
) -> FederationIdentity {
let federation_id = fedimint_client.federation_id();
Expand Down Expand Up @@ -950,7 +945,6 @@ pub(crate) async fn get_federation_identity(
fedimint_client.get_meta("welcome_message"),
config.as_ref().and_then(|c| c.welcome_message.clone()),
),
gateway_fees, // Already merged using helper function...
federation_icon_url: merge_values(
fedimint_client.get_meta("federation_icon_url"),
config.as_ref().and_then(|c| c.federation_icon_url.clone()),
Expand Down
2 changes: 0 additions & 2 deletions mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3804,13 +3804,11 @@ pub(crate) async fn create_new_federation<S: MutinyStorage>(
storage.insert_federations(federation_mutex.clone()).await?;

let federation_id = new_federation.fedimint_client.federation_id();
let gateway_fees = new_federation.gateway_fee().await.ok();

let new_federation_identity = get_federation_identity(
next_federation_uuid.clone(),
new_federation.fedimint_client.clone(),
federation_code.clone(),
gateway_fees,
logger.clone(),
)
.await;
Expand Down
Loading