From e9cffc309b14cc33e735051415e6f756565e5d3f Mon Sep 17 00:00:00 2001 From: ail3n Date: Mon, 9 Dec 2024 11:22:40 -0300 Subject: [PATCH] manage is_chain_available and is_dao_owner ok --- src/components/molecules/create_dao_button.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/molecules/create_dao_button.rs b/src/components/molecules/create_dao_button.rs index 02a0031..a043442 100644 --- a/src/components/molecules/create_dao_button.rs +++ b/src/components/molecules/create_dao_button.rs @@ -24,7 +24,6 @@ pub fn CreateDaoButton(props: CreateDaoButtonProps) -> Element { let handle_click = move |_| { nav.push( vec![ - Box::new(is_chain_available(i18.clone(), timestamp.clone(), notification.clone())), Box::new(is_dao_owner(i18.clone(), accounts.clone(), notification.clone())), ], "/onboarding", @@ -32,8 +31,10 @@ pub fn CreateDaoButton(props: CreateDaoButtonProps) -> Element { }; let handle_mouse_enter = move |_| { + let chain_available = is_chain_available(i18.clone(), timestamp.clone(), notification.clone())(); let is_owner = is_dao_owner(i18.clone(), accounts.clone(), notification.clone())(); - if is_owner.is_err() { + + if chain_available.is_ok() && is_owner.is_err() { show_tooltip.set(true); } };