Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet: text description fix #18319

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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
Expand Down
24 changes: 13 additions & 11 deletions src/status_im/contexts/wallet/edit_account/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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")}]
Expand Down Expand Up @@ -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}]]))))
3 changes: 2 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2378,7 +2378,8 @@
"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-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",
Expand Down