Skip to content

Commit

Permalink
cleanup #30
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelPepe committed Oct 22, 2023
1 parent 076c51a commit 8a89c3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
10 changes: 2 additions & 8 deletions frontend/src/components/tokenIconsCell/TokenIconsCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,27 @@ export const TokenIconsCell: FC<TokensIconsPropsI> = ({ 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;
}
}
};

const getAllTokensIcons = () => {
const test = getTokenIcon(anchorCurrency);
console.log('test', test);
setAnchorCurrencyInfo(test);
const tokensInfoList: ITokenObject[] = tokens
.map((token) => getTokenIcon(token))
.filter((token): token is ITokenObject => {
return token !== undefined;
});
setTokensInfo(tokensInfoList);
// console.log('result', tokensInfoList);
};
useEffect(() => {
getAllTokensIcons();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [anchorCurrency, tokens]);

return (
<>
Expand Down
20 changes: 0 additions & 20 deletions frontend/src/pages/PoolsPage/PoolsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,6 @@ export type TPool = {

export const PoolsPage: FC<PoolsPagePropsI> = ({ poolsType }) => {
const [poolsData, setPoolsData] = useState<TPool[]>([]);
// 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}`) => {
Expand Down

0 comments on commit 8a89c3b

Please sign in to comment.