From ab06bcf50d767100ce010dfab65b2a299f3542e3 Mon Sep 17 00:00:00 2001 From: tomasklim Date: Thu, 4 Jul 2024 12:16:32 +0200 Subject: [PATCH] chore(suite): show also cardano unit to user --- .../views/wallet/tokens/common/TokenList.tsx | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/packages/suite/src/views/wallet/tokens/common/TokenList.tsx b/packages/suite/src/views/wallet/tokens/common/TokenList.tsx index 9cadef9e0ff4..312e0ae65105 100644 --- a/packages/suite/src/views/wallet/tokens/common/TokenList.tsx +++ b/packages/suite/src/views/wallet/tokens/common/TokenList.tsx @@ -328,11 +328,7 @@ export const TokenList = ({ }, { key: 'contract-address', - label: translationString( - network.networkType === 'cardano' - ? 'TR_POLICY_ID_ADDRESS' - : 'TR_CONTRACT_ADDRESS', - ), + label: translationString('TR_CONTRACT_ADDRESS'), options: [ { label: ( @@ -345,11 +341,7 @@ export const TokenList = ({ dispatch( openModal({ type: 'copy-address', - addressType: - network.networkType === - 'cardano' - ? 'policyId' - : 'contract', + addressType: 'contract', address: token.contract, }), ), @@ -379,6 +371,28 @@ export const TokenList = ({ }, ], }, + token.policyId && { + key: 'policyId', + label: translationString('TR_POLICY_ID_ADDRESS'), + options: [ + { + label: ( + + {token.policyId} + + + ), + onClick: () => + dispatch( + openModal({ + type: 'copy-address', + addressType: 'policyId', + address: token.policyId as string, + }), + ), + }, + ], + }, ].filter(category => category) as GroupedMenuItems[] } />