Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚧(llm) POC crypto icons #8269

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/ledger-live-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"@ledgerhq/coin-elrond": "workspace:^",
"@ledgerhq/coin-evm": "workspace:^",
"@ledgerhq/coin-framework": "workspace:^",
"@ledgerhq/crypto-icons": "1.0.2-test.next2",
"@ledgerhq/devices": "workspace:*",
"@ledgerhq/domain-service": "workspace:^",
"@ledgerhq/errors": "workspace:^",
Expand Down Expand Up @@ -133,6 +134,7 @@
"@shopify/react-native-performance-navigation": "3.0.0",
"@tanstack/react-query": "5.28.9",
"asyncstorage-down": "4.2.0",
"axios": "1.7.7",
"bignumber.js": "9.1.2",
"buffer": "6.0.3",
"color": "4.2.3",
Expand Down
22 changes: 18 additions & 4 deletions apps/ledger-live-mobile/src/components/AssetRowLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { TouchableOpacity, TouchableOpacityProps } from "react-native";
import CurrencyUnitValue from "./CurrencyUnitValue";
import CounterValue from "./CounterValue";
import Delta from "./Delta";
import ParentCurrencyIcon from "./ParentCurrencyIcon";

import { CryptoIcon } from "@ledgerhq/crypto-icons";
type Props = {
balance: BigNumber;
currency: Currency;
Expand All @@ -37,7 +36,12 @@ const AssetRowLayout = ({
countervalueChange,
tag,
}: Props) => {
const { colors, space } = useTheme();
const { colors, space, theme } = useTheme();

const isFiatCurrency = currency.type === "FiatCurrency";
const isTokenCurrency = currency.type === "TokenCurrency";

if (isFiatCurrency) return null;

return (
<TouchableOpacity onPress={onPress}>
Expand All @@ -51,7 +55,17 @@ const AssetRowLayout = ({
/>
)}
<Flex flexDirection="row" pt={topLink ? 0 : 6} pb={bottomLink ? 0 : 6} alignItems="center">
<ParentCurrencyIcon currency={currency} size={40} />
{isTokenCurrency ? (
<CryptoIcon
ledgerId={currency.id}
ticker={currency.ticker}
network={currency.parentCurrency.id}
theme={theme}
size="56px"
/>
) : (
<CryptoIcon ledgerId={currency.id} ticker={currency.ticker} theme={theme} size="56px" />
)}
<Flex flex={1} justifyContent="center" ml={4}>
<Flex mb={1} flexDirection="row" justifyContent="space-between">
<Flex flexGrow={1} flexShrink={1} flexDirection="row" alignItems="center">
Expand Down
54 changes: 41 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading