All addresses text is not updated when changing accounts (#19379)

This commit is contained in:
Ibrahem Khalil 2024-03-25 22:14:40 +02:00 committed by GitHub
parent 44846c80c8
commit 3be1532b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View File

@ -20,6 +20,13 @@
has-permissions? (rf/sub [:communities/has-permissions? id]) has-permissions? (rf/sub [:communities/has-permissions? id])
airdrop-account (rf/sub [:communities/airdrop-account id]) airdrop-account (rf/sub [:communities/airdrop-account id])
revealed-accounts (rf/sub [:communities/accounts-to-reveal 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]) {:keys [highest-permission-role]} (rf/sub [:community/token-gated-overview id])
highest-role-text (i18n/label (communities.utils/role->translation-key highest-role-text (i18n/label (communities.utils/role->translation-key
highest-permission-role highest-permission-role
@ -108,7 +115,7 @@
:label :preview :label :preview
:label-props {:type :accounts :label-props {:type :accounts
:data revealed-accounts} :data revealed-accounts}
:description-props {:text (i18n/label :t/all-addresses)}} :description-props {:text addresses-shared-text}}
{:title (i18n/label :t/for-airdrops) {:title (i18n/label :t/for-airdrops)
:on-press show-airdrop-addresses :on-press show-airdrop-addresses
:description :text :description :text

View File

@ -2558,5 +2558,9 @@
"ledger-live": "Ledger live", "ledger-live": "Ledger live",
"keep-key": "KeepKey", "keep-key": "KeepKey",
"type-your-path": "Type your own derivation path", "type-your-path": "Type your own derivation path",
"default-format": "Default format" "default-format": "Default format",
"address-count": {
"one": "1 address",
"other": "{{count}} addresses"
}
} }