mirror of
https://github.com/status-im/status-react.git
synced 2025-02-17 13:28:04 +00:00
Fix usage of ratom to fix wallet share (#18883)
This commit is contained in:
parent
33e637ff71
commit
0937da9e50
@ -39,7 +39,7 @@
|
||||
(fn []
|
||||
[network-preferences/view
|
||||
{:blur? true
|
||||
:selected-networks (set selected-networks)
|
||||
:selected-networks (set @selected-networks)
|
||||
:on-save (fn [chain-ids]
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(reset! selected-networks (map #(get utils/id->network %)
|
||||
@ -48,7 +48,10 @@
|
||||
[props]
|
||||
(let [{:keys [account width index]} props
|
||||
selected-networks (reagent/atom [:ethereum :optimism :arbitrum])
|
||||
wallet-type (reagent/atom :legacy)]
|
||||
wallet-type (reagent/atom :legacy)
|
||||
on-settings-press #(open-preferences selected-networks)
|
||||
on-legacy-press #(reset! wallet-type :legacy)
|
||||
on-multichain-press #(reset! wallet-type :multichain)]
|
||||
(fn []
|
||||
(let [share-title (str (:name account) " " (i18n/label :t/address))
|
||||
qr-url (utils/get-wallet-qr {:wallet-type @wallet-type
|
||||
@ -72,9 +75,9 @@
|
||||
:full-name (:name account)
|
||||
:customization-color (:color account)
|
||||
:emoji (:emoji account)
|
||||
:on-multichain-press #(reset! wallet-type :multichain)
|
||||
:on-legacy-press #(reset! wallet-type :legacy)
|
||||
:on-settings-press #(open-preferences @selected-networks)}]]]))))
|
||||
:on-multichain-press on-multichain-press
|
||||
:on-legacy-press on-legacy-press
|
||||
:on-settings-press on-settings-press}]]]))))
|
||||
|
||||
(def wallet-qr-code-item (memoize wallet-qr-code-item-internal))
|
||||
|
||||
|
@ -48,11 +48,14 @@
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [padding-top (:top (safe-area/get-insets))
|
||||
wallet-type (reagent/atom :legacy)
|
||||
;; Design team is yet to confirm the default selected networks here.
|
||||
;; Should be the current selected for the account or all the networks always
|
||||
selected-networks (reagent/atom [:ethereum :optimism :arbitrum])]
|
||||
(let [padding-top (:top (safe-area/get-insets))
|
||||
wallet-type (reagent/atom :legacy)
|
||||
;; Design team is yet to confirm the default selected networks here. Should be the current
|
||||
;; selected for the account or all the networks always
|
||||
selected-networks (reagent/atom [:ethereum :optimism :arbitrum])
|
||||
on-settings-press #(open-preferences selected-networks)
|
||||
on-legacy-press #(reset! wallet-type :legacy)
|
||||
on-multichain-press #(reset! wallet-type :multichain)]
|
||||
(fn []
|
||||
(let [{:keys [address color emoji watch-only?]
|
||||
:as account} (rf/sub [:wallet/current-viewing-account])
|
||||
@ -97,6 +100,6 @@
|
||||
:full-name (:name account)
|
||||
:customization-color color
|
||||
:emoji emoji
|
||||
:on-legacy-press #(reset! wallet-type :legacy)
|
||||
:on-multichain-press #(reset! wallet-type :multichain)
|
||||
:on-settings-press #(open-preferences selected-networks)}]]]]))))
|
||||
:on-legacy-press on-legacy-press
|
||||
:on-multichain-press on-multichain-press
|
||||
:on-settings-press on-settings-press}]]]]))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user