Skip to content

Commit

Permalink
chore(suite): show also cardano unit to user
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Jul 4, 2024
1 parent 74243ad commit ab06bcf
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions packages/suite/src/views/wallet/tokens/common/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: (
Expand All @@ -345,11 +341,7 @@ export const TokenList = ({
dispatch(
openModal({
type: 'copy-address',
addressType:
network.networkType ===
'cardano'
? 'policyId'
: 'contract',
addressType: 'contract',
address: token.contract,
}),
),
Expand Down Expand Up @@ -379,6 +371,28 @@ export const TokenList = ({
},
],
},
token.policyId && {
key: 'policyId',
label: translationString('TR_POLICY_ID_ADDRESS'),
options: [
{
label: (
<ContractAddress>
{token.policyId}
<StyledIcon icon="COPY" size={14} />
</ContractAddress>
),
onClick: () =>
dispatch(
openModal({
type: 'copy-address',
addressType: 'policyId',
address: token.policyId as string,
}),
),
},
],
},
].filter(category => category) as GroupedMenuItems[]
}
/>
Expand Down

0 comments on commit ab06bcf

Please sign in to comment.