mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 03:54:32 +00:00
chore: make new wallet UI default, move set currency to legacy settings, remove add eth network on wallet init (#18027)
This commit is contained in:
parent
d039864dca
commit
c25f44c2a0
@ -7,6 +7,11 @@
|
|||||||
[utils.i18n :as i18n])
|
[utils.i18n :as i18n])
|
||||||
(:require-macros [status-im.utils.views :as views]))
|
(:require-macros [status-im.utils.views :as views]))
|
||||||
|
|
||||||
|
(defn hide-sheet-and-dispatch
|
||||||
|
[event]
|
||||||
|
(re-frame/dispatch [:bottom-sheet/hide-old])
|
||||||
|
(re-frame/dispatch event))
|
||||||
|
|
||||||
(defn- normal-mode-settings-data
|
(defn- normal-mode-settings-data
|
||||||
[{:keys [network-name
|
[{:keys [network-name
|
||||||
current-log-level
|
current-log-level
|
||||||
@ -103,7 +108,13 @@
|
|||||||
#(re-frame/dispatch
|
#(re-frame/dispatch
|
||||||
[:multiaccounts.ui/waku-bloom-filter-mode-switched (not waku-bloom-filter-mode)])
|
[:multiaccounts.ui/waku-bloom-filter-mode-switched (not waku-bloom-filter-mode)])
|
||||||
:accessory :switch
|
:accessory :switch
|
||||||
:active waku-bloom-filter-mode}]))
|
:active waku-bloom-filter-mode}
|
||||||
|
{:size :small
|
||||||
|
:title (i18n/label :t/set-currency)
|
||||||
|
:accessibility-label :wallet-change-currency
|
||||||
|
:on-press #(hide-sheet-and-dispatch
|
||||||
|
[:navigate-to :currency-settings])
|
||||||
|
:chevron true}]))
|
||||||
|
|
||||||
(defn- flat-list-data
|
(defn- flat-list-data
|
||||||
[options]
|
[options]
|
||||||
|
@ -1074,7 +1074,7 @@
|
|||||||
|
|
||||||
;;TODO: this could be replaced by a single API call on status-go side
|
;;TODO: this could be replaced by a single API call on status-go side
|
||||||
(re-frame/reg-fx :wallet-legacy/initialize-wallet
|
(re-frame/reg-fx :wallet-legacy/initialize-wallet
|
||||||
(fn [[network-id network callback]]
|
(fn [[network-id _network callback]]
|
||||||
(-> (js/Promise.all
|
(-> (js/Promise.all
|
||||||
(clj->js
|
(clj->js
|
||||||
[(js/Promise.
|
[(js/Promise.
|
||||||
@ -1082,24 +1082,6 @@
|
|||||||
(json-rpc/call {:method "accounts_getAccounts"
|
(json-rpc/call {:method "accounts_getAccounts"
|
||||||
:on-success resolve-fn
|
:on-success resolve-fn
|
||||||
:on-error reject})))
|
:on-error reject})))
|
||||||
(js/Promise.
|
|
||||||
(fn [resolve-fn _]
|
|
||||||
(json-rpc/call
|
|
||||||
{:method "wallet_addEthereumChain"
|
|
||||||
:params
|
|
||||||
[{:isTest false
|
|
||||||
:tokenOverrides []
|
|
||||||
:rpcUrl (get-in network [:config :UpstreamConfig :URL])
|
|
||||||
:chainColor "green"
|
|
||||||
:chainName (:name network)
|
|
||||||
:nativeCurrencyDecimals 10
|
|
||||||
:shortName "erc20"
|
|
||||||
:layer 1
|
|
||||||
:chainId (int network-id)
|
|
||||||
:enabled false
|
|
||||||
:fallbackURL (get-in network [:config :UpstreamConfig :URL])}]
|
|
||||||
:on-success resolve-fn
|
|
||||||
:on-error (fn [_] (resolve-fn nil))})))
|
|
||||||
(js/Promise.
|
(js/Promise.
|
||||||
(fn [resolve-fn _]
|
(fn [resolve-fn _]
|
||||||
(json-rpc/call {:method "wallet_getTokens"
|
(json-rpc/call {:method "wallet_getTokens"
|
||||||
|
@ -17,6 +17,5 @@
|
|||||||
(def load-chats-stack? (reagent/atom false))
|
(def load-chats-stack? (reagent/atom false))
|
||||||
(def load-wallet-stack? (reagent/atom false))
|
(def load-wallet-stack? (reagent/atom false))
|
||||||
(def load-browser-stack? (reagent/atom false))
|
(def load-browser-stack? (reagent/atom false))
|
||||||
|
|
||||||
;NOTE temporary while we support old wallet
|
;NOTE temporary while we support old wallet
|
||||||
(def load-new-wallet? (reagent/atom false))
|
(def load-new-wallet? (reagent/atom true))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user