Skip to content

Commit

Permalink
feat: add LI.FI as a tool
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed May 18, 2022
1 parent 095a39f commit a637ca0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
5 changes: 5 additions & 0 deletions packages/widget/src/icons/LiFiLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions packages/widget/src/icons/waitIcon.tsx

This file was deleted.

11 changes: 9 additions & 2 deletions packages/widget/src/pages/SwappingPage/ToolItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ArrowForward as ArrowForwardIcon } from '@mui/icons-material';
import { Avatar, Box, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useChains } from '../../hooks';
import LiFiLogo from '../../icons/LiFiLogo.svg';
import { formatTokenAmount } from '../../utils/format';

export const ToolItem: React.FC<{
Expand All @@ -11,7 +12,11 @@ export const ToolItem: React.FC<{
return (
<Box px={2} py={1}>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
<Avatar src={step.toolDetails.logoURI} alt={step.toolDetails.name}>
<Avatar
variant={step.type === 'lifi' ? 'square' : 'circular'}
src={step.type === 'lifi' ? LiFiLogo : step.toolDetails.logoURI}
alt={step.toolDetails.name}
>
{step.toolDetails.name[0]}
</Avatar>
<Typography
Expand All @@ -20,7 +25,9 @@ export const ToolItem: React.FC<{
fontWeight="500"
textTransform="capitalize"
>
{step.toolDetails.name}
{step.type === 'lifi'
? 'LI.FI Smart Contract'
: step.toolDetails.name}
</Typography>
</Box>
<Box ml={6}>
Expand Down

0 comments on commit a637ca0

Please sign in to comment.