Skip to content

Commit

Permalink
All addresses text is not updated when changing accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Mar 23, 2024
1 parent 399da79 commit 851e31c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.contexts.communities.actions.accounts-selection.view
(:require
[clojure.string :as string]
[quo.core :as quo]
[react-native.core :as rn]
[react-native.gesture :as gesture]
Expand All @@ -20,6 +21,16 @@
has-permissions? (rf/sub [:communities/has-permissions? id])
airdrop-account (rf/sub [:communities/airdrop-account id])
revealed-accounts (rf/sub [:communities/accounts-to-reveal id])
revealed-accounts-count (count revealed-accounts)
wallet-accounts-count (count (rf/sub [:wallet/accounts-without-watched-accounts]))
addresses-shared-text (condp = revealed-accounts-count
1 (str "1 "
(string/lower-case (i18n/label :t/address)))
wallet-accounts-count (i18n/label :t/all-addresses)
(str revealed-accounts-count
" "
(string/lower-case (i18n/label
:t/addresses))))
{:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id])
highest-role-text (i18n/label (communities.utils/role->translation-key
highest-permission-role
Expand Down Expand Up @@ -108,7 +119,7 @@
:label :preview
:label-props {:type :accounts
:data revealed-accounts}
:description-props {:text (i18n/label :t/all-addresses)}}
:description-props {:text addresses-shared-text}}
{:title (i18n/label :t/for-airdrops)
:on-press show-airdrop-addresses
:description :text
Expand Down
1 change: 1 addition & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"add-to-contacts": "Add to contacts",
"add-to-contacts-text": "By adding a user to your contact list, you share your wallet address",
"address": "Address",
"addresses": "addresses",
"address-received": "Address received",
"address-requested": "Address requested",
"address-request-accepted": "Address request accepted",
Expand Down

0 comments on commit 851e31c

Please sign in to comment.