disable button when no network is selected + fix schema errors (#19814)
This commit is contained in:
parent
d9aa885eb2
commit
e9c2d24cc3
|
@ -1,6 +1,6 @@
|
||||||
(ns quo.components.wallet.network-link.schema)
|
(ns quo.components.wallet.network-link.schema)
|
||||||
|
|
||||||
(def ^:private ?networks [:enum :optimism :arbitrum :ethereum])
|
(def ^:private ?networks [:enum :optimism :arbitrum :ethereum :mainnet])
|
||||||
|
|
||||||
(def ?schema
|
(def ?schema
|
||||||
[:=>
|
[:=>
|
||||||
|
|
|
@ -109,8 +109,10 @@
|
||||||
{:size :paragraph-2
|
{:size :paragraph-2
|
||||||
:style style/warning-text} (i18n/label :t/receiver-networks-warning)]])
|
:style style/warning-text} (i18n/label :t/receiver-networks-warning)]])
|
||||||
[quo/bottom-actions
|
[quo/bottom-actions
|
||||||
{:button-one-label (i18n/label :t/apply-changes)
|
{:actions :one-action
|
||||||
:button-one-props {:disabled? (= selected-networks @network-preferences)
|
:button-one-label (i18n/label :t/apply-changes)
|
||||||
|
:button-one-props {:disabled? (or (= selected-networks @network-preferences)
|
||||||
|
(empty? @network-preferences))
|
||||||
:on-press (fn []
|
:on-press (fn []
|
||||||
(rf/dispatch [:wallet/update-receiver-networks
|
(rf/dispatch [:wallet/update-receiver-networks
|
||||||
@network-preferences])
|
@network-preferences])
|
||||||
|
|
Loading…
Reference in New Issue