From c8039e931d942799b0d08b55ed457fb185d96da9 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Fri, 29 Dec 2023 07:46:48 +0400 Subject: [PATCH 1/2] text fix --- translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en.json b/translations/en.json index a0e77acd496..cee281e894b 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2378,7 +2378,7 @@ "account-info": "Account info", "account-name-input-placeholder": "Account name", "network-preferences": "Network preferences", - "network-preferences-desc": "Select which networks to receive funds on", + "network-preferences-desc": "Select which networks this address is happy to receive funds on", "layer-2": "Layer 2", "manage-tokens": "Manage tokens", "edit-derivation-path": "Edit derivation path", From d58fa56f32c571ca37ac001779c974aaad904482 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Tue, 2 Jan 2024 13:11:55 +0400 Subject: [PATCH 2/2] lint --- .../sheets/network_preferences/view.cljs | 6 +++-- .../contexts/wallet/edit_account/view.cljs | 24 ++++++++++--------- translations/en.json | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs b/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs index 4cc47f72e2e..064aa1afe31 100644 --- a/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs +++ b/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs @@ -28,7 +28,7 @@ :on-change on-change}}) (defn- view-internal - [{:keys [selected-networks]}] + [{:keys [selected-networks watch-only?]}] (let [state (reagent/atom :default) {:keys [color address network-preferences-names]} (rf/sub [:wallet/current-viewing-account]) @@ -63,7 +63,9 @@ :blur-radius 25}]) [quo/drawer-top {:title (i18n/label :t/network-preferences) - :description (i18n/label :t/network-preferences-desc) + :description (if watch-only? + (i18n/label :t/network-preferences-desc-1) + (i18n/label :t/network-preferences-desc-2)) :blur? blur?}] [quo/data-item {:status :default diff --git a/src/status_im/contexts/wallet/edit_account/view.cljs b/src/status_im/contexts/wallet/edit_account/view.cljs index 397506eb44f..10d0e1e6fa9 100644 --- a/src/status_im/contexts/wallet/edit_account/view.cljs +++ b/src/status_im/contexts/wallet/edit_account/view.cljs @@ -49,11 +49,12 @@ :updated-key :name :new-value @edited-account-name}))] (fn [] - (let [{:keys [name emoji address color] :as account} (rf/sub [:wallet/current-viewing-account]) - network-details (rf/sub [:wallet/network-preference-details]) - account-name (or @edited-account-name name) - button-disabled? (or (nil? @edited-account-name) - (= name @edited-account-name))] + (let [{:keys [name emoji address color watch-only?] + :as account} (rf/sub [:wallet/current-viewing-account]) + network-details (rf/sub [:wallet/network-preference-details]) + account-name (or @edited-account-name name) + button-disabled? (or (nil? @edited-account-name) + (= name @edited-account-name))] [create-or-edit-account/view {:page-nav-right-side [{:icon-name :i/delete :on-press #(js/alert "Delete account: to be implemented")}] @@ -90,10 +91,11 @@ {:content (fn [] [network-preferences/view - {:on-save (fn [chain-ids] - (rf/dispatch [:hide-bottom-sheet]) - (save-account - {:account account - :updated-key :prod-preferred-chain-ids - :new-value chain-ids}))}])}])) + {:on-save (fn [chain-ids] + (rf/dispatch [:hide-bottom-sheet]) + (save-account + {:account account + :updated-key :prod-preferred-chain-ids + :new-value chain-ids})) + :watch-only? watch-only?}])}])) :container-style style/data-item}]])))) diff --git a/translations/en.json b/translations/en.json index cee281e894b..2bca9c76186 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2378,7 +2378,8 @@ "account-info": "Account info", "account-name-input-placeholder": "Account name", "network-preferences": "Network preferences", - "network-preferences-desc": "Select which networks this address is happy to receive funds on", + "network-preferences-desc-1": "Select which networks this address is happy to receive funds on", + "network-preferences-desc-2": "Select which networks to receive funds on", "layer-2": "Layer 2", "manage-tokens": "Manage tokens", "edit-derivation-path": "Edit derivation path",