Skip to content

Commit

Permalink
Improve sub to check primary keypair
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisesmac committed May 22, 2024
1 parent ce104a1 commit 5818b9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/status_im/subs/wallet/wallet.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@
:<- [:wallet/keypairs]
:<- [:wallet/selected-keypair-uid]
(fn [[keypairs selected-keypair-uid]]
(= selected-keypair-uid (:key-uid (first keypairs)))))
(let [primary-keypair-uid (->> keypairs
(some #(when (= (:type %) "profile") %))
(:key-uid))]
(= selected-keypair-uid primary-keypair-uid))))

(rf/reg-sub
:wallet/selected-networks->chain-ids
Expand Down

0 comments on commit 5818b9f

Please sign in to comment.