From e9c2d24cc3671c1caf4a32af20e3624dd0c74fa2 Mon Sep 17 00:00:00 2001 From: mmilad75 <55688834+mmilad75@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:42:29 +0100 Subject: [PATCH] disable button when no network is selected + fix schema errors (#19814) --- src/quo/components/wallet/network_link/schema.cljs | 2 +- src/status_im/contexts/wallet/send/routes/view.cljs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/quo/components/wallet/network_link/schema.cljs b/src/quo/components/wallet/network_link/schema.cljs index e8d2ec086b..0efe4bca51 100644 --- a/src/quo/components/wallet/network_link/schema.cljs +++ b/src/quo/components/wallet/network_link/schema.cljs @@ -1,6 +1,6 @@ (ns quo.components.wallet.network-link.schema) -(def ^:private ?networks [:enum :optimism :arbitrum :ethereum]) +(def ^:private ?networks [:enum :optimism :arbitrum :ethereum :mainnet]) (def ?schema [:=> diff --git a/src/status_im/contexts/wallet/send/routes/view.cljs b/src/status_im/contexts/wallet/send/routes/view.cljs index e1adccaa0a..2b222907ea 100644 --- a/src/status_im/contexts/wallet/send/routes/view.cljs +++ b/src/status_im/contexts/wallet/send/routes/view.cljs @@ -109,8 +109,10 @@ {:size :paragraph-2 :style style/warning-text} (i18n/label :t/receiver-networks-warning)]]) [quo/bottom-actions - {:button-one-label (i18n/label :t/apply-changes) - :button-one-props {:disabled? (= selected-networks @network-preferences) + {:actions :one-action + :button-one-label (i18n/label :t/apply-changes) + :button-one-props {:disabled? (or (= selected-networks @network-preferences) + (empty? @network-preferences)) :on-press (fn [] (rf/dispatch [:wallet/update-receiver-networks @network-preferences])