Skip to content

Commit

Permalink
disable button when no network is selected + fix schema errors (#19814)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilad75 committed Apr 29, 2024
1 parent d9aa885 commit e9c2d24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/quo/components/wallet/network_link/schema.cljs
Original file line number Diff line number Diff line change
@@ -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
[:=>
Expand Down
6 changes: 4 additions & 2 deletions src/status_im/contexts/wallet/send/routes/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit e9c2d24

Please sign in to comment.