disable button when no network is selected + fix schema errors (#19814)

This commit is contained in:
mmilad75 2024-04-29 14:42:29 +01:00 committed by GitHub
parent d9aa885eb2
commit e9c2d24cc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -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
[:=>

View File

@ -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])