diff --git a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx index ad15c85cb..17eef1060 100644 --- a/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx +++ b/apps/browser-extension-wallet/src/components/DropdownMenu/DropdownMenu.tsx @@ -66,7 +66,7 @@ export const DropdownMenu = ({ isPopup }: DropdownMenuProps): React.ReactElement profile={ activeWalletAvatar ? { - fallback: walletName, + fallbackText: walletName, imageSrc: activeWalletAvatar } : undefined diff --git a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx index ef5f056f8..7825109cf 100644 --- a/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx +++ b/apps/browser-extension-wallet/src/components/MainMenu/DropdownMenuOverlay/components/UserInfo.tsx @@ -111,7 +111,7 @@ export const UserInfo = ({ onOpenWalletAccounts, avatarVisible = true }: UserInf profile={ walletAvatar ? { - fallback: fullWalletName, + fallbackText: fullWalletName, imageSrc: walletAvatar } : undefined diff --git a/packages/core/src/ui/components/DappAddressSections/DappAddressSection.tsx b/packages/core/src/ui/components/DappAddressSections/DappAddressSection.tsx new file mode 100644 index 000000000..d7e101b6f --- /dev/null +++ b/packages/core/src/ui/components/DappAddressSections/DappAddressSection.tsx @@ -0,0 +1,191 @@ +import React from 'react'; +import { truncate, addEllipsis } from '@lace/common'; +import { Wallet } from '@lace/cardano'; +import { Cardano, AssetInfoWithAmount } from '@cardano-sdk/core'; + +import styles from './DappAddressSections.module.scss'; +import { useTranslate } from '@src/ui/hooks'; + +import { Text, TransactionAssets, DappTransactionSummary, Tooltip, SummaryExpander, Box, Flex } from '@lace/ui'; +import { getAddressTagTranslations, renderAddressTag } from '@src/ui/utils'; + +interface GroupedAddressAssets { + nfts: Array; + tokens: Array; + coins: Array; +} + +export interface DappAddressSectionProps { + groupedAddresses: Map; + title: string; + isEnabled: boolean; + coinSymbol: string; + addressType: 'from' | 'to'; + ownAddresses: string[]; + addressToNameMap?: Map; +} + +const tryDecodeAsUtf8 = ( + value: WithImplicitCoercion | { [Symbol.toPrimitive](hint: 'string'): string } +): string => { + const bytes = Uint8Array.from(Buffer.from(value, 'hex')); + const decoder = new TextDecoder('utf-8'); + // Decode the Uint8Array to a UTF-8 string + return decoder.decode(bytes); +}; + +const getFallbackName = (asset: AssetInfoWithAmount) => + tryDecodeAsUtf8(asset.assetInfo.name) ? tryDecodeAsUtf8(asset.assetInfo.name) : asset.assetInfo.assetId; + +const isNFT = (asset: AssetInfoWithAmount) => asset.assetInfo.supply === BigInt(1); + +const getAssetTokenName = (assetWithAmount: AssetInfoWithAmount) => { + if (isNFT(assetWithAmount)) { + return assetWithAmount.assetInfo.nftMetadata?.name ?? getFallbackName(assetWithAmount); + } + return assetWithAmount.assetInfo.tokenMetadata?.ticker ?? getFallbackName(assetWithAmount); +}; + +const charBeforeEllName = 9; +const charAfterEllName = 0; + +type UseTranslate = ReturnType['t']; + +const getTransactionAssetTranslations = (t: UseTranslate) => ({ + assetId: t('core.dappTransaction.assetId'), + policyId: t('core.dappTransaction.policyId') +}); + +const displayGroupedNFTs = (nfts: AssetInfoWithAmount[], t: UseTranslate, testId?: string) => + nfts.map((nft: AssetInfoWithAmount) => { + const imageSrc = nft.assetInfo.tokenMetadata?.icon ?? nft.assetInfo.nftMetadata?.image ?? undefined; + return ( + + ); + }); + +const displayGroupedTokens = (tokens: AssetInfoWithAmount[], t: UseTranslate, testId?: string) => + tokens.map((token: AssetInfoWithAmount) => { + const imageSrc = token.assetInfo.tokenMetadata?.icon ?? token.assetInfo.nftMetadata?.image ?? undefined; + + return ( + + ); + }); + +const charBeforeEllipsisName = 8; +const charAfterEllipsisName = 8; + +const getStringFromLovelace = (value: bigint): string => Wallet.util.lovelacesToAdaString(value.toString()); + +const getTokenQuantity = (tokens: Array, coins: Array) => { + let quantity = tokens.length; + + if (coins.length > 0) { + quantity += 1; + } + + return quantity; +}; +export const DappAddressSection = ({ + groupedAddresses, + isEnabled, + coinSymbol, + title, + addressType, + ownAddresses, + addressToNameMap +}: DappAddressSectionProps): React.ReactElement => { + const { t } = useTranslate(); + + const itemsCountCopy = t('core.dappTransaction.items'); + + return ( + + {[...groupedAddresses.entries()].map(([address, addressData]) => ( + +
+ + {t('core.dappTransaction.address')} + + + + + {addEllipsis(address, charBeforeEllipsisName, charAfterEllipsisName)} + + {renderAddressTag(address, getAddressTagTranslations(t), ownAddresses, addressToNameMap)} + +
+ {(addressData.tokens.length > 0 || addressData.coins.length > 0) && ( + <> +
+ + {t('core.dappTransaction.tokens')} + + + {addressType === 'to' + ? `${getTokenQuantity(addressData.tokens, addressData.coins)} ${itemsCountCopy}` + : `-${getTokenQuantity(addressData.tokens, addressData.coins)} ${itemsCountCopy}`} + +
+ {addressData.coins.map((coin) => ( + + ))} + {displayGroupedTokens(addressData.tokens, t, `dapp-transaction-${addressType}-row`)} + + )} + + {addressData.nfts.length > 0 && ( + <> +
+ + {t('core.dappTransaction.nfts')} + + + {addressType === 'to' + ? `${addressData.nfts.length} ${itemsCountCopy}` + : `-${addressData.nfts.length} ${itemsCountCopy}`} + +
+ {displayGroupedNFTs(addressData.nfts, t, `dapp-transaction-${addressType}-row`)} + + )} +
+ ))} +
+ ); +}; diff --git a/packages/core/src/ui/components/DappAddressSections/DappAddressSections.module.scss b/packages/core/src/ui/components/DappAddressSections/DappAddressSections.module.scss index 74bf3b3cc..4d373f762 100644 --- a/packages/core/src/ui/components/DappAddressSections/DappAddressSections.module.scss +++ b/packages/core/src/ui/components/DappAddressSections/DappAddressSections.module.scss @@ -1,34 +1,14 @@ @import '../../styles/theme.scss'; @import '../../../../../common/src/ui/styles/abstracts/_typography.scss'; -.label { - color: var(--text-color-primary, #ffffff) !important; - font-size: 16px; - font-weight: 600; -} - -.value { - color: var(--text-color-primary, #ffffff) !important; - font-size: 14px; - font-weight: 500; -} - .address { display: flex; justify-content: space-between; padding: size_unit(2.5) 0; } -.summaryContent { - padding-bottom: size_unit(2.5); -} - .tokenCount { display: flex; justify-content: space-between; align-items: end; } - -.positiveAmount { - color: var(--data-green, #2CB67D) !important; -} diff --git a/packages/core/src/ui/components/DappAddressSections/DappAddressSections.tsx b/packages/core/src/ui/components/DappAddressSections/DappAddressSections.tsx index 3836c964d..671aa22af 100644 --- a/packages/core/src/ui/components/DappAddressSections/DappAddressSections.tsx +++ b/packages/core/src/ui/components/DappAddressSections/DappAddressSections.tsx @@ -1,16 +1,10 @@ /* eslint-disable sonarjs/no-identical-functions */ import React from 'react'; -import { truncate, addEllipsis } from '@lace/common'; -import { Wallet } from '@lace/cardano'; import { Cardano, AssetInfoWithAmount } from '@cardano-sdk/core'; -import { Typography } from 'antd'; -import styles from './DappAddressSections.module.scss'; import { useTranslate } from '@src/ui/hooks'; -import { Flex, TransactionAssets, SummaryExpander, DappTransactionSummary, Tooltip } from '@lace/ui'; -import classNames from 'classnames'; -import { getAddressTagTranslations, renderAddressTag } from '@ui/utils/render-address-tag'; +import { DappAddressSection } from './DappAddressSection'; interface GroupedAddressAssets { nfts: Array; @@ -28,90 +22,6 @@ export interface DappAddressSectionProps { addressToNameMap?: Map; } -const tryDecodeAsUtf8 = ( - value: WithImplicitCoercion | { [Symbol.toPrimitive](hint: 'string'): string } -): string => { - const bytes = Uint8Array.from(Buffer.from(value, 'hex')); - const decoder = new TextDecoder('utf-8'); - // Decode the Uint8Array to a UTF-8 string - return decoder.decode(bytes); -}; - -const getFallbackName = (asset: AssetInfoWithAmount) => - tryDecodeAsUtf8(asset.assetInfo.name) ? tryDecodeAsUtf8(asset.assetInfo.name) : asset.assetInfo.assetId; - -const isNFT = (asset: AssetInfoWithAmount) => asset.assetInfo.supply === BigInt(1); - -const getAssetTokenName = (assetWithAmount: AssetInfoWithAmount) => { - if (isNFT(assetWithAmount)) { - return assetWithAmount.assetInfo.nftMetadata?.name ?? getFallbackName(assetWithAmount); - } - return assetWithAmount.assetInfo.tokenMetadata?.ticker ?? getFallbackName(assetWithAmount); -}; - -const charBeforeEllName = 9; -const charAfterEllName = 0; - -type UseTranslate = ReturnType['t']; - -const getTransactionAssetTranslations = (t: UseTranslate) => ({ - assetId: t('core.dappTransaction.assetId'), - policyId: t('core.dappTransaction.policyId') -}); - -const displayGroupedNFTs = (nfts: AssetInfoWithAmount[], t: UseTranslate, testId?: string) => - nfts.map((nft: AssetInfoWithAmount) => { - const imageSrc = nft.assetInfo.tokenMetadata?.icon ?? nft.assetInfo.nftMetadata?.image ?? undefined; - return ( - - ); - }); - -const displayGroupedTokens = (tokens: AssetInfoWithAmount[], t: UseTranslate, testId?: string) => - tokens.map((token: AssetInfoWithAmount) => { - const imageSrc = token.assetInfo.tokenMetadata?.icon ?? token.assetInfo.nftMetadata?.image ?? undefined; - - return ( - - ); - }); - -const { Title, Text } = Typography; - -const charBeforeEllipsisName = 8; -const charAfterEllipsisName = 8; - -const getStringFromLovelace = (value: bigint): string => Wallet.util.lovelacesToAdaString(value.toString()); - -const getTokenQuantity = (tokens: Array, coins: Array) => { - let quantity = tokens.length; - - if (coins.length > 0) { - quantity += 1; - } - - return quantity; -}; export const DappAddressSections = ({ groupedFromAddresses, groupedToAddresses, @@ -123,141 +33,27 @@ export const DappAddressSections = ({ }: DappAddressSectionProps): React.ReactElement => { const { t } = useTranslate(); - const itemsCountCopy = t('core.dappTransaction.items'); - return ( <> - -
- {[...groupedFromAddresses.entries()].map(([address, addressData]) => ( - <> -
- - {t('core.dappTransaction.address')} - - - - - {addEllipsis(address, charBeforeEllipsisName, charAfterEllipsisName)} - - - {renderAddressTag(address, getAddressTagTranslations(t), ownAddresses, addressToNameMap)} - -
- {(addressData.tokens.length > 0 || addressData.coins.length > 0) && ( - <> -
- - {t('core.dappTransaction.tokens')} - - - -{getTokenQuantity(addressData.tokens, addressData.coins)} {itemsCountCopy} - -
- {addressData.coins.map((coin) => ( - - ))} - {displayGroupedTokens(addressData.tokens, t, 'dapp-transaction-from-row')} - - )} - - {addressData.nfts.length > 0 && ( - <> -
- - {t('core.dappTransaction.nfts')} - - - -{addressData.nfts.length} {itemsCountCopy} - -
- {displayGroupedNFTs(addressData.nfts, t, 'dapp-transaction-from-row')} - - )} - - ))} -
-
+ isEnabled={isFromAddressesEnabled} + ownAddresses={ownAddresses} + addressToNameMap={addressToNameMap} + /> - -
- {[...groupedToAddresses.entries()].map(([address, addressData]) => ( - <> -
- - {t('core.dappTransaction.address')} - - - - - {addEllipsis(address, charBeforeEllipsisName, charAfterEllipsisName)} - - - {renderAddressTag(address, getAddressTagTranslations(t), ownAddresses, addressToNameMap)} - -
- {(addressData.tokens.length > 0 || addressData.coins.length > 0) && ( - <> -
- - {t('core.dappTransaction.tokens')} - - - {getTokenQuantity(addressData.tokens, addressData.coins)} {itemsCountCopy} - -
- {addressData.coins.map((coin) => ( - - ))} - {displayGroupedTokens(addressData.tokens, t, 'dapp-transaction-to-row')} - - )} - - {addressData.nfts.length > 0 && ( - <> -
- - {t('core.dappTransaction.nfts')} - - - {addressData.nfts.length} {itemsCountCopy} - -
- {displayGroupedNFTs(addressData.nfts, t, 'dapp-transaction-to-row')} - - )} - - ))} -
-
+ isEnabled={isToAddressesEnabled} + ownAddresses={ownAddresses} + addressToNameMap={addressToNameMap} + /> ); }; diff --git a/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx b/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx index eaa01c983..c4f0de584 100644 --- a/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx +++ b/packages/core/src/ui/components/DappTransaction/DappTransaction.tsx @@ -11,7 +11,7 @@ import styles from './DappTransaction.module.scss'; import { useTranslate } from '@src/ui/hooks'; import { TransactionFee, Collateral } from '@ui/components/ActivityDetail'; -import { TransactionType, DappTransactionSummary, TransactionAssets } from '@lace/ui'; +import { TransactionType, DappTransactionSummary, TransactionAssets, Text, Box, Divider } from '@lace/ui'; import { DappAddressSections } from '../DappAddressSections/DappAddressSections'; const amountTransformer = (fiat: { price: number; code: string }) => (ada: string) => @@ -136,6 +136,7 @@ export const DappTransaction = ({ adaTooltip={t('core.dappTransaction.adaTooltip')} cardanoSymbol={coinSymbol} transactionAmount={Wallet.util.lovelacesToAdaString(coins.toString())} + tooltip={t('core.dappTransaction.transactionSummaryTooltip')} />
{[...assets].map(([key, assetWithAmount]: [string, AssetInfoWithAmount]) => { @@ -162,6 +163,14 @@ export const DappTransaction = ({ })}
+ + + + + + {t('core.dappTransaction.additionalInformation')} + + {collateral !== undefined && collateral !== BigInt(0) && ( { if (value === '' || value === undefined) { - return setThemeFallbackImagine; + return themeFallbackImage; } else if (value.startsWith('ipfs')) { return value.replace('ipfs://', 'https://ipfs.io/ipfs/'); } else if (isImageBase64Encoded(value)) { @@ -82,7 +82,7 @@ export const TransactionAssets = ({ - {balance} {tokenName} - + diff --git a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx index 1e23cb84c..13f37d7fe 100644 --- a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx +++ b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.component.tsx @@ -1,8 +1,11 @@ +/* eslint-disable @typescript-eslint/strict-boolean-expressions */ /* eslint-disable @typescript-eslint/prefer-optional-chain */ import React from 'react'; import { ReactComponent as CardanoLogoComponent } from '@lace/icons/dist/CardanoLogoComponent'; +import { ReactComponent as InfoIcon } from '@lace/icons/dist/InfoComponent'; +import { Box } from '../box'; import { Flex } from '../flex'; import { Grid, Cell } from '../grid'; import { Text } from '../text'; @@ -18,6 +21,7 @@ type Props = OmitClassName<'div'> & { adaTooltip: string; title?: string; cardanoSymbol?: string; + tooltip?: string; }; export const TransactionSummary = ({ @@ -26,12 +30,20 @@ export const TransactionSummary = ({ adaTooltip, title, cardanoSymbol, + tooltip, ...props }: Readonly): JSX.Element => (
{title !== undefined && ( - {title} + {title} + {tooltip && ( + + + + + + )} )}
@@ -44,12 +56,12 @@ export const TransactionSummary = ({ - {transactionAmount} {cardanoSymbol} - + diff --git a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.css.ts b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.css.ts index 37685d473..cd7d2cab3 100644 --- a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.css.ts +++ b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.css.ts @@ -30,3 +30,15 @@ export const assetsContainer = style({ export const txSummaryContainer = style({ paddingTop: '20px', }); + +export const tooltipIcon = style([ + sx({ + color: '$text_primary', + height: '$24', + width: '$24', + }), +]); + +export const iconContainer = style({ + lineHeight: 0, +}); diff --git a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.stories.tsx b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.stories.tsx index 3a9309649..e6a3100d7 100644 --- a/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.stories.tsx +++ b/packages/ui/src/design-system/dapp-transaction-summary/dapp-transaction-summary.stories.tsx @@ -88,6 +88,7 @@ const Example = (): JSX.Element => ( {items.map(value => ( diff --git a/packages/ui/src/design-system/profile-dropdown/accounts/profile-dropdown-account-item.component.tsx b/packages/ui/src/design-system/profile-dropdown/accounts/profile-dropdown-account-item.component.tsx index 5ef5c4357..b176f838e 100644 --- a/packages/ui/src/design-system/profile-dropdown/accounts/profile-dropdown-account-item.component.tsx +++ b/packages/ui/src/design-system/profile-dropdown/accounts/profile-dropdown-account-item.component.tsx @@ -76,7 +76,7 @@ export const AccountItem = ({ diff --git a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-trigger.component.tsx b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-trigger.component.tsx index 9ea905684..3e325beca 100644 --- a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-trigger.component.tsx +++ b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-trigger.component.tsx @@ -20,7 +20,7 @@ export type Props = Omit, 'type'> & { subtitle: string; profile?: { imageSrc: string; - fallback: string; + fallbackText: string; alt?: string; delayMs?: number; }; diff --git a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx index 852bee0ba..767da5af7 100644 --- a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx +++ b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-card.component.tsx @@ -20,7 +20,7 @@ export interface Props { subtitle: string; profile?: { imageSrc: string; - fallback: string; + fallbackText: string; alt?: string; delayMs?: number; }; diff --git a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx index 1f7ff0752..344529403 100644 --- a/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx +++ b/packages/ui/src/design-system/profile-dropdown/profile-dropdown-wallet-option.component.tsx @@ -19,7 +19,7 @@ export type Props = Omit, 'type'> & { subtitle: string; profile?: { imageSrc: string; - fallback: string; + fallbackText: string; alt?: string; delayMs?: number; }; diff --git a/packages/ui/src/design-system/profile-picture/profile-picture.stories.tsx b/packages/ui/src/design-system/profile-picture/profile-picture.stories.tsx index aaf2d5fe1..24dd8a0b5 100644 --- a/packages/ui/src/design-system/profile-picture/profile-picture.stories.tsx +++ b/packages/ui/src/design-system/profile-picture/profile-picture.stories.tsx @@ -3,7 +3,10 @@ import React from 'react'; import type { Meta } from '@storybook/react'; import cardanoImage from '../../assets/images/cardano-blue-bg.png'; +import DarkFallBack from '../../assets/images/dark-mode-fallback.png'; +import LightFallBack from '../../assets/images/light-mode-fallback.png'; import { ThemeColorScheme, LocalThemeProvider } from '../../design-tokens'; +import { useThemeVariant } from '../../design-tokens/theme/hooks/use-theme-variant'; import { page, Variants, Section } from '../decorators'; import { Divider } from '../divider'; import { Grid, Cell } from '../grid'; @@ -25,25 +28,41 @@ export default { decorators: [page({ title: 'Profile picture', subtitle })], } as Meta; -const Images = (): JSX.Element => ( - <> - - - - - - - - - - - - - - - - -); +const Images = (): JSX.Element => { + const { theme } = useThemeVariant(); + const fallbackImage = + theme === ThemeColorScheme.Dark ? DarkFallBack : LightFallBack; + + return ( + <> + + + + + + + + + + + + + + + + + + + + + + ); +}; export const Overview = (): JSX.Element => ( @@ -52,7 +71,7 @@ export const Overview = (): JSX.Element => ( - + @@ -74,18 +93,18 @@ export const Overview = (): JSX.Element => ( > - + diff --git a/packages/ui/src/design-system/profile-picture/user-profile.component.tsx b/packages/ui/src/design-system/profile-picture/user-profile.component.tsx index c86357105..e1e645e89 100644 --- a/packages/ui/src/design-system/profile-picture/user-profile.component.tsx +++ b/packages/ui/src/design-system/profile-picture/user-profile.component.tsx @@ -9,21 +9,28 @@ import * as cx from './user-profile.css'; interface Props { imageSrc: string; - fallback: string; alt?: string; delayMs?: number; radius?: 'circle' | 'rounded'; background?: 'none'; } +interface FallbackText { + fallbackText: string; +} + +interface FallbackImage { + fallbackImage: string; +} + export const UserProfile = ({ imageSrc, - fallback: letter, alt, delayMs = 600, radius = 'circle', background, -}: Readonly): JSX.Element => ( + ...rest +}: Readonly): JSX.Element => ( - - - {letter} - + + {'fallbackImage' in rest ? ( + {alt} + ) : ( + + {rest.fallbackText} + + )} ); diff --git a/packages/ui/src/design-system/summary-expander/summary-expander.component.tsx b/packages/ui/src/design-system/summary-expander/summary-expander.component.tsx index ef7940766..07b61dd43 100644 --- a/packages/ui/src/design-system/summary-expander/summary-expander.component.tsx +++ b/packages/ui/src/design-system/summary-expander/summary-expander.component.tsx @@ -45,9 +45,10 @@ export const SummaryExpander = ({ [cx.expanded]: open, })} > - + {title} - + + diff --git a/packages/ui/src/design-system/transaction-summary/transaction-summary-amount.component.tsx b/packages/ui/src/design-system/transaction-summary/transaction-summary-amount.component.tsx index be27be119..f9d112013 100644 --- a/packages/ui/src/design-system/transaction-summary/transaction-summary-amount.component.tsx +++ b/packages/ui/src/design-system/transaction-summary/transaction-summary-amount.component.tsx @@ -46,19 +46,16 @@ export const Amount = ({ {label} {tooltip !== undefined && ( - + -
- +
+
@@ -67,23 +64,23 @@ export const Amount = ({ - {amount} - + {displayFiat && ( - {fiatPrice} - + )} diff --git a/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx b/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx index 432e2a46a..fcf0158b4 100644 --- a/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx +++ b/packages/ui/src/design-system/transaction-summary/transaction-summary-metadata.component.tsx @@ -23,12 +23,12 @@ export const Metadata = ({ return ( - {label} - + diff --git a/packages/ui/src/design-system/transaction-summary/transaction-summary.css.ts b/packages/ui/src/design-system/transaction-summary/transaction-summary.css.ts index 7e0edae8a..13ccd8e8f 100644 --- a/packages/ui/src/design-system/transaction-summary/transaction-summary.css.ts +++ b/packages/ui/src/design-system/transaction-summary/transaction-summary.css.ts @@ -8,17 +8,10 @@ export const secondaryText = style({ wordBreak: 'break-all', }); -export const tooltip = style([ +export const tooltipIcon = style([ sx({ - color: '$transaction_summary_secondary_label_color', - width: '$24', + color: '$text_primary', height: '$24', - fontSize: '$25', - }), -]); - -export const tooltipText = style([ - sx({ - display: 'flex', + width: '$24', }), ]); diff --git a/packages/ui/src/design-tokens/colors.data.ts b/packages/ui/src/design-tokens/colors.data.ts index 1ae714588..9019c0a0a 100644 --- a/packages/ui/src/design-tokens/colors.data.ts +++ b/packages/ui/src/design-tokens/colors.data.ts @@ -149,7 +149,6 @@ export const colors = { $transaction_summary_secondary_label_color: '', $dapp_transaction_summary_type_label_color: '', - $dapp_transaction_summary_label: '', $toast_bar_container_bgColor: '', $toast_bar_icon_container_bgColor: '', diff --git a/packages/ui/src/design-tokens/theme/dark-theme.css.ts b/packages/ui/src/design-tokens/theme/dark-theme.css.ts index 2781f124c..64b38a349 100644 --- a/packages/ui/src/design-tokens/theme/dark-theme.css.ts +++ b/packages/ui/src/design-tokens/theme/dark-theme.css.ts @@ -220,7 +220,6 @@ const colors: Colors = { $dapp_transaction_summary_type_label_color: darkColorScheme.$primary_accent_purple, - $dapp_transaction_summary_label: darkColorScheme.$primary_white, $toast_bar_container_bgColor: darkColorScheme.$primary_dark_grey, $toast_bar_icon_container_bgColor: darkColorScheme.$primary_grey, diff --git a/packages/ui/src/design-tokens/theme/light-theme.css.ts b/packages/ui/src/design-tokens/theme/light-theme.css.ts index 1ebd47a1f..29a59dd65 100644 --- a/packages/ui/src/design-tokens/theme/light-theme.css.ts +++ b/packages/ui/src/design-tokens/theme/light-theme.css.ts @@ -240,7 +240,6 @@ const colors: Colors = { $dapp_transaction_summary_type_label_color: lightColorScheme.$primary_accent_purple, - $dapp_transaction_summary_label: lightColorScheme.$primary_dark_grey, $toast_bar_container_bgColor: lightColorScheme.$primary_white, $toast_bar_icon_container_bgColor: lightColorScheme.$primary_light_grey,