Skip to content

Commit

Permalink
All addresses text is not updated when changing accounts (#19379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil authored and mmilad75 committed Apr 2, 2024
1 parent 1fa2cf8 commit 5e400f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
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 (if (= revealed-accounts-count wallet-accounts-count)
(i18n/label :t/all-addresses)
(i18n/label-pluralize
revealed-accounts-count
:t/address-count))
{: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 +115,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
6 changes: 5 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2558,5 +2558,9 @@
"ledger-live": "Ledger live",
"keep-key": "KeepKey",
"type-your-path": "Type your own derivation path",
"default-format": "Default format"
"default-format": "Default format",
"address-count": {
"one": "1 address",
"other": "{{count}} addresses"
}
}

0 comments on commit 5e400f2

Please sign in to comment.