chore(settings)_: Remove testnet toggle from legacy advanced settings (#20875)

This commit removes two toggles from legacy advanced settings

- "Testnet mode" - duplicate toggle as the user can switch to testnet from wallet settings
- "Enable Goerli as test network" - Goerli is depreciated and wallet services use Sepolia testnet as default. 

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
Mohamed Javid 2024-07-25 21:41:57 +05:30 committed by GitHub
parent eae8a65597
commit be82365542
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 23 deletions

View File

@ -20,8 +20,6 @@
light-client-enabled? light-client-enabled?
store-confirmations-enabled? store-confirmations-enabled?
current-fleet current-fleet
test-networks-enabled?
is-goerli-enabled?
peer-syncing-enabled?]}] peer-syncing-enabled?]}]
(keep (keep
identity identity
@ -87,22 +85,6 @@
[:wakuv2.ui/toggle-store-confirmations (not store-confirmations-enabled?)]) [:wakuv2.ui/toggle-store-confirmations (not store-confirmations-enabled?)])
:accessory :switch :accessory :switch
:active store-confirmations-enabled?} :active store-confirmations-enabled?}
{:size :small
:title "Testnet mode"
:accessibility-label :test-networks-enabled
:container-margin-bottom 8
:on-press
#(re-frame/dispatch [:profile.settings/toggle-test-networks])
:accessory :switch
:active test-networks-enabled?}
{:size :small
:title "Enable Goerli as test network"
:accessibility-label :enable-sepolia-as-test-network
:container-margin-bottom 8
:on-press
#(re-frame/dispatch [:profile.settings/toggle-goerli-test-network])
:accessory :switch
:active is-goerli-enabled?}
{:size :small {:size :small
:title "Peer syncing" :title "Peer syncing"
:accessibility-label :peer-syncing :accessibility-label :peer-syncing
@ -124,9 +106,7 @@
(views/defview advanced-settings (views/defview advanced-settings
[] []
(views/letsubs [test-networks-enabled? [:profile/test-networks-enabled?] (views/letsubs [light-client-enabled? [:profile/light-client-enabled?]
is-goerli-enabled? [:profile/is-goerli-enabled?]
light-client-enabled? [:profile/light-client-enabled?]
store-confirmations-enabled? [:profile/store-confirmations-enabled?] store-confirmations-enabled? [:profile/store-confirmations-enabled?]
telemetry-enabled? [:profile/telemetry-enabled?] telemetry-enabled? [:profile/telemetry-enabled?]
current-log-level [:log-level/current-log-level] current-log-level [:log-level/current-log-level]
@ -147,8 +127,6 @@
:store-confirmations-enabled? store-confirmations-enabled? :store-confirmations-enabled? store-confirmations-enabled?
:current-fleet current-fleet :current-fleet current-fleet
:dev-mode? false :dev-mode? false
:test-networks-enabled? test-networks-enabled?
:is-goerli-enabled? is-goerli-enabled?
:peer-syncing-enabled? peer-syncing-enabled?}) :peer-syncing-enabled? peer-syncing-enabled?})
:key-fn (fn [_ i] (str i)) :key-fn (fn [_ i] (str i))
:render-fn render-item}]])) :render-fn render-item}]]))