Fix re-frame warning about fx being nil (#20175)

Fixes a warning thrown by re-frame in the event
:wallet/blockchain-status-changed.

Here's a simplified example that generates the same warning.

```clojure
(rf/reg-event-fx :user/fx-warning
 (fn []
   {:fx nil}))

;; Prints warning re-frame: ":fx" effect expects a seq, but was given null
(rf/dispatch [:user/fx-warning])
```
This commit is contained in:
Icaro Motta 2024-05-27 18:54:49 -03:00 committed by GitHub
parent 2fc5bed094
commit 3d1c0c61f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -194,6 +194,8 @@
(def ^:const community-id-length 68)
(def ^:const toast-chain-down-duration 5000)
; BIP44 Wallet Root Key, the extended key from which any wallet can be derived
(def ^:const path-wallet-root "m/44'/60'/0'/0")
; EIP1581 Root Key, the extended key from which any whisper key/encryption key can be derived

View File

@ -416,13 +416,13 @@
(log/info "[wallet] Test network enabled: " (boolean test-networks-enabled?))
(log/info "[wallet] Goerli network enabled: " (boolean is-goerli-enabled?)))
{:db (assoc-in db [:wallet :statuses :blockchains] chains)
:fx (when chains-down?
[[:dispatch
:fx [(when chains-down?
[:dispatch
[:toasts/upsert
{:id :chains-down
:type :negative
:text (i18n/label :t/provider-is-down {:chains chain-names})
:duration 10000}]]])})))
:duration constants/toast-chain-down-duration}]])]})))
(defn reset-selected-networks
[{:keys [db]}]