diff --git a/mutiny-core/src/federation.rs b/mutiny-core/src/federation.rs index a22837dd1..b3635fd17 100644 --- a/mutiny-core/src/federation.rs +++ b/mutiny-core/src/federation.rs @@ -147,13 +147,25 @@ impl FederationClient { ) -> Result { log_info!(logger, "initializing a new federation client: {uuid}"); - let federation_info = FederationInfo::from_invite_code(federation_code.clone()).await?; + let federation_info = FederationInfo::from_invite_code(federation_code.clone()) + .await + .map_err(|e| { + log_error!(logger, "Could not parse invite code: {}", e); + e + })?; + + log_debug!( + logger, + "parsed federation invite code: {:?}", + federation_info.invite_code() + ); let mut client_builder = fedimint_client::Client::builder(); client_builder.with_module(WalletClientInit(None)); client_builder.with_module(MintClientInit); client_builder.with_module(LightningClientInit); + log_trace!(logger, "Building fedimint client db"); let db = g .new_fedimint_client_db(federation_info.federation_id().to_string()) .await? @@ -165,6 +177,7 @@ impl FederationClient { client_builder.with_database(db); client_builder.with_primary_module(1); + log_trace!(logger, "Building fedimint client db"); let secret = create_federation_secret(xprivkey, network)?; let fedimint_client = client_builder @@ -174,6 +187,8 @@ impl FederationClient { )) .await?; + log_trace!(logger, "Retrieving fedimint wallet client module"); + // check federation is on expected network let wallet_client = fedimint_client.get_first_module::(); if network != wallet_client.get_network() {