Skip to content

Commit

Permalink
fix(product-components): add back legacy coin icons
Browse files Browse the repository at this point in the history
  • Loading branch information
martykan committed Oct 18, 2024
1 parent 5396d67 commit 85465be
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styled, { useTheme } from 'styled-components';
import { coinsColors } from '@trezor/theme';
import { CoinLogo, CoinLogoProps } from '../CoinLogo/CoinLogo';
import { motionEasing } from '@trezor/components';
import { NetworkSymbol } from '@suite-common/wallet-config';

const Container = styled.div`
position: relative;
Expand All @@ -16,6 +17,7 @@ const Container = styled.div`
`;

export interface AssetShareIndicatorProps extends CoinLogoProps {
symbol: NetworkSymbol;
percentageShare?: number;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ImgHTMLAttributes } from 'react';
import { ReactSVG } from 'react-svg';
import styled from 'styled-components';
import { COINS } from './coins';
import { COINS, LegacyNetworkSymbol } from './coins';
import { NetworkSymbol } from '@suite-common/wallet-config';

export interface CoinLogoProps extends ImgHTMLAttributes<HTMLImageElement> {
symbol: NetworkSymbol;
symbol: NetworkSymbol | LegacyNetworkSymbol;
className?: string;
size?: number;
index?: number;
Expand Down
9 changes: 8 additions & 1 deletion packages/product-components/src/components/CoinLogo/coins.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { NetworkSymbol } from '@suite-common/wallet-config';

export const COINS: Record<NetworkSymbol, string> = {
// These coins are not supported in Suite, but exist in Trezor Connect
export type LegacyNetworkSymbol = 'eos' | 'nem' | 'xlm' | 'xtz';

export const COINS: Record<NetworkSymbol | LegacyNetworkSymbol, string> = {
ada: require('../../images/coins/ada.svg'),
bch: require('../../images/coins/bch.svg'),
bnb: require('../../images/coins/bnb.svg'),
Expand All @@ -10,11 +13,13 @@ export const COINS: Record<NetworkSymbol, string> = {
dgb: require('../../images/coins/dgb.svg'),
doge: require('../../images/coins/doge.svg'),
dsol: require('../../images/coins/dsol.svg'),
eos: require('../../images/coins/eos.svg'),
etc: require('../../images/coins/etc.svg'),
eth: require('../../images/coins/eth.svg'),
ltc: require('../../images/coins/ltc.svg'),
op: require('../../images/coins/op.svg'),
pol: require('../../images/coins/pol.svg'),
nem: require('../../images/coins/nem.svg'),
nmc: require('../../images/coins/nmc.svg'),
regtest: require('../../images/coins/btc_test.svg'),
sol: require('../../images/coins/sol.svg'),
Expand All @@ -24,6 +29,8 @@ export const COINS: Record<NetworkSymbol, string> = {
tsep: require('../../images/coins/tsep.svg'),
txrp: require('../../images/coins/txrp.svg'),
vtc: require('../../images/coins/vtc.svg'),
xlm: require('../../images/coins/xlm.svg'),
xrp: require('../../images/coins/xrp.svg'),
xtz: require('../../images/coins/xtz.svg'),
zec: require('../../images/coins/zec.svg'),
};
4 changes: 4 additions & 0 deletions packages/product-components/src/images/coins/eos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/product-components/src/images/coins/nem.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/product-components/src/images/coins/xlm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/product-components/src/images/coins/xtz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 85465be

Please sign in to comment.