Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aelmanaa committed Nov 12, 2024
1 parent e8f8b3c commit 17e5128
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/CCIP/Chain/ChainTokenGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function ChainTokenGrid({ tokens, network, environment }: ChainTokenGridProps) {
key,
logo: networkLogo,
tokenId: token.id,
tokenLogo: network.logo || "",
tokenLogo: token.logo || "",
tokenName: data[key].name || "",
tokenSymbol: data[key].symbol,
tokenDecimals: data[key].decimals,
Expand Down
13 changes: 8 additions & 5 deletions src/components/CCIP/Token/Token.astro
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ const supportedTokens = getAllSupportedTokens({
const tokens = Object.keys(supportedTokens).sort((a, b) => a.localeCompare(b, undefined, { sensitivity: "base" }))
const chainsOfToken = getChainsOfToken({ token, filter: environment })
const firstSupportedChain = chainsOfToken[0]
const allTokens = tokens.map((token) => {
const logo = getTokenIconUrl(token) || ""
return {
id: token,
logo,
totalNetworks: getChainsOfToken({ token, filter: environment }).length,
totalNetworks: chainsOfToken.length,
}
})
Expand Down Expand Up @@ -68,9 +71,9 @@ const searchLanes = getSearchLanes({ environment })
lanes={searchLanes}
token={{
id: token,
name: data[Object.keys(data)[0]]?.name || "",
name: data[firstSupportedChain]?.name || "",
logo: logo || "",
symbol: data[Object.keys(data)[0]].symbol,
symbol: data[firstSupportedChain].symbol,
}}
environment={environment}
/>
Expand Down Expand Up @@ -105,9 +108,9 @@ const searchLanes = getSearchLanes({ environment })
lanes={tokenLanes}
token={{
id: token,
name: data[Object.keys(data)[0]]?.name || "",
name: data[firstSupportedChain]?.name || "",
logo: logo || "",
symbol: data[Object.keys(data)[0]]?.symbol,
symbol: data[firstSupportedChain]?.symbol,
}}
/>
</div>
Expand Down

0 comments on commit 17e5128

Please sign in to comment.