From fb7654e5e9aa3f042c95e2c7cb871faf55682dd6 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 13 May 2024 14:26:57 -0500 Subject: [PATCH] Remove parsing for unnecessary federation bool --- mutiny-core/src/federation.rs | 58 ----------------------------------- 1 file changed, 58 deletions(-) diff --git a/mutiny-core/src/federation.rs b/mutiny-core/src/federation.rs index 12ada9065..a6ffc4542 100644 --- a/mutiny-core/src/federation.rs +++ b/mutiny-core/src/federation.rs @@ -167,15 +167,10 @@ pub struct FederationIdentity { pub max_balance_msats: Option, pub max_invoice_msats: Option, pub meta_external_url: Option, - pub onchain_deposits_disabled: Option, pub preview_message: Option, - pub public: Option, pub tos_url: Option, pub popup_end_timestamp: Option, pub popup_countdown_message: Option, - pub invite_codes_disabled: Option, - pub stability_pool_disabled: Option, - pub social_recovery_disabled: Option, } #[derive(Serialize, Deserialize, Debug)] @@ -199,15 +194,10 @@ pub struct FederationMeta { pub max_balance_msats: Option, pub max_invoice_msats: Option, pub meta_external_url: Option, - pub onchain_deposits_disabled: Option, pub preview_message: Option, - pub public: Option, pub tos_url: Option, pub popup_end_timestamp: Option, pub popup_countdown_message: Option, - pub invite_codes_disabled: Option, - pub stability_pool_disabled: Option, - pub social_recovery_disabled: Option, } #[derive(Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize)] @@ -969,28 +959,10 @@ pub(crate) async fn get_federation_identity( .and_then(|c| c.max_invoice_msats.clone().map(|v| v.parse().unwrap_or(0))), ), meta_external_url, // Already set... - onchain_deposits_disabled: merge_values( - fedimint_client - .get_meta("onchain_deposits_disabled") - .map(|v| v.parse().unwrap_or(false)), - config.as_ref().and_then(|c| { - c.onchain_deposits_disabled - .clone() - .map(|v| v.parse().unwrap_or(false)) - }), - ), preview_message: merge_values( fedimint_client.get_meta("preview_message"), config.as_ref().and_then(|c| c.preview_message.clone()), ), - public: merge_values( - fedimint_client - .get_meta("public") - .map(|v| v.parse().unwrap_or(false)), - config - .as_ref() - .and_then(|c| c.public.clone().map(|v| v.parse().unwrap_or(false))), - ), tos_url: merge_values( fedimint_client.get_meta("tos_url"), config.as_ref().and_then(|c| c.tos_url.clone()), @@ -1013,36 +985,6 @@ pub(crate) async fn get_federation_identity( .as_ref() .and_then(|c| c.popup_countdown_message.clone()), ), - invite_codes_disabled: merge_values( - fedimint_client - .get_meta("invite_codes_disabled") - .map(|v| v.parse().unwrap_or(false)), - config.as_ref().and_then(|c| { - c.invite_codes_disabled - .clone() - .map(|v| v.parse().unwrap_or(false)) - }), - ), - stability_pool_disabled: merge_values( - fedimint_client - .get_meta("stability_pool_disabled") - .map(|v| v.parse().unwrap_or(false)), - config.as_ref().and_then(|c| { - c.stability_pool_disabled - .clone() - .map(|v| v.parse().unwrap_or(false)) - }), - ), - social_recovery_disabled: merge_values( - fedimint_client - .get_meta("social_recovery_disabled") - .map(|v| v.parse().unwrap_or(false)), - config.as_ref().and_then(|c| { - c.social_recovery_disabled - .clone() - .map(|v| v.parse().unwrap_or(false)) - }), - ), } }