diff --git a/frontend/src/components/tokenIconsCell/TokenIconsCell.tsx b/frontend/src/components/tokenIconsCell/TokenIconsCell.tsx index f3a7393..3f840a2 100644 --- a/frontend/src/components/tokenIconsCell/TokenIconsCell.tsx +++ b/frontend/src/components/tokenIconsCell/TokenIconsCell.tsx @@ -11,12 +11,8 @@ export const TokenIconsCell: FC = ({ anchorCurrency, tokens } const polygonData: ITokenObject[] = polygonPopular; const getTokenIcon = (tokenAddress: string) => { - console.log('123s', typeof tokenAddress); for (const elem of polygonData) { - if (elem.address == tokenAddress) { - console.log('---', elem.address); - console.log('---', tokenAddress); - console.log(elem); + if (elem.address.toLowerCase() == tokenAddress.toLowerCase()) { return elem; } } @@ -24,7 +20,6 @@ export const TokenIconsCell: FC = ({ anchorCurrency, tokens } const getAllTokensIcons = () => { const test = getTokenIcon(anchorCurrency); - console.log('test', test); setAnchorCurrencyInfo(test); const tokensInfoList: ITokenObject[] = tokens .map((token) => getTokenIcon(token)) @@ -32,12 +27,11 @@ export const TokenIconsCell: FC = ({ anchorCurrency, tokens } return token !== undefined; }); setTokensInfo(tokensInfoList); - // console.log('result', tokensInfoList); }; useEffect(() => { getAllTokensIcons(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [anchorCurrency, tokens]); return ( <> diff --git a/frontend/src/pages/PoolsPage/PoolsPage.tsx b/frontend/src/pages/PoolsPage/PoolsPage.tsx index c77396f..7bb60e7 100644 --- a/frontend/src/pages/PoolsPage/PoolsPage.tsx +++ b/frontend/src/pages/PoolsPage/PoolsPage.tsx @@ -14,26 +14,6 @@ export type TPool = { export const PoolsPage: FC = ({ poolsType }) => { const [poolsData, setPoolsData] = useState([]); - // const tableData: TPool[] = [ - // { - // address: '0', - // allowedTokens: [ - // '0x0000000000000000000000000000000000001010', - // '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', - // '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', - // '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', - // '0xd6df932a45c0f255f85145f286ea0b292b21c90b', - // '0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39', - // '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6', - // '0xb33eaad8d922b1083446dc23f610c2567fb5180f', - // '0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a', - // ], - // anchorCurrency: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', - // operatorFee: 10, - // }, - // ]; - - //todo: improve the acquisition of contract data const contract: `0x${string}` = '0x606279b2c388ed37d0e5e52ea0d75eb2b539a57e'; const contractsList = [contract]; const getAnchorCurrency = async (address: `0x${string}`) => {