From 7efc5b360036de2e449d2b9b1a5af18ba30feac5 Mon Sep 17 00:00:00 2001 From: akira-zkdice Date: Sat, 20 Apr 2024 17:10:38 +0530 Subject: [PATCH] format fix --- .eslintrc.json | 9 +- src/app/claims/components/ClaimInfoCard.tsx | 2 +- src/app/claims/page.tsx | 18 ++-- src/app/template.tsx | 78 ++++++++--------- src/components/Filters.tsx | 6 +- src/components/LoadingWrap.tsx | 8 +- src/components/TxButton.tsx | 51 ++++++----- src/constants.ts | 96 ++++++++++----------- src/hooks/useERC20Balance.ts | 22 ++--- src/store/claims.atoms.ts | 4 +- src/store/haiko.store.ts | 20 ++--- src/store/myswap.store.ts | 20 ++--- src/store/nimbora.store.ts | 18 ++-- src/store/nostradex.store.ts | 18 ++-- src/store/pools.ts | 4 +- src/store/sithswap.store.ts | 18 ++-- src/store/starkdefi.store.ts | 18 ++-- src/store/strategies.atoms.ts | 8 +- src/store/tenkswap.store.ts | 18 ++-- src/utils.ts | 18 ++-- 20 files changed, 210 insertions(+), 244 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 00025ff..9afedd6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -72,7 +72,14 @@ "wrap-iife": [2, "outside"], "no-shadow": 0, "no-path-concat": 2, - "valid-jsdoc": [0, { "requireReturn": false, "requireParamDescription": false, "requireReturnDescription": false }], + "valid-jsdoc": [ + 0, + { + "requireReturn": false, + "requireParamDescription": false, + "requireReturnDescription": false + } + ], // stylistic errors "no-spaced-func": 2, diff --git a/src/app/claims/components/ClaimInfoCard.tsx b/src/app/claims/components/ClaimInfoCard.tsx index 3804523..cdecdcc 100644 --- a/src/app/claims/components/ClaimInfoCard.tsx +++ b/src/app/claims/components/ClaimInfoCard.tsx @@ -1,4 +1,4 @@ -import { Card } from "@chakra-ui/react"; +import { Card } from '@chakra-ui/react'; export interface ClaimInfoCardProps {} diff --git a/src/app/claims/page.tsx b/src/app/claims/page.tsx index ae701a4..5fea47a 100644 --- a/src/app/claims/page.tsx +++ b/src/app/claims/page.tsx @@ -1,4 +1,4 @@ -"use client"; +'use client'; import { Avatar, @@ -11,20 +11,20 @@ import { Stat, StatLabel, StatNumber, -} from "@chakra-ui/react"; +} from '@chakra-ui/react'; -import CONSTANTS from "@/constants"; +import CONSTANTS from '@/constants'; export default function Claim() { return ( - - - + + + Claim $STRK Tokens - + Total Earned 345,670 @@ -32,7 +32,7 @@ export default function Claim() { - + Total Claimed 345,670 @@ -40,7 +40,7 @@ export default function Claim() { - + Unclaimed 345,670 diff --git a/src/app/template.tsx b/src/app/template.tsx index 20aaaf1..0bd172c 100644 --- a/src/app/template.tsx +++ b/src/app/template.tsx @@ -1,63 +1,63 @@ -"use client"; +'use client'; -import * as React from "react"; +import * as React from 'react'; -import { sepolia } from "@starknet-react/chains"; +import { sepolia } from '@starknet-react/chains'; import { StarknetConfig, argent, braavos, useInjectedConnectors, jsonRpcProvider, -} from "@starknet-react/core"; +} from '@starknet-react/core'; import { ChakraBaseProvider, extendTheme, Flex, Center, Container, -} from "@chakra-ui/react"; -import { Provider as JotaiProvider } from "jotai"; -import Image from "next/image"; -import Navbar from "@/components/Navbar"; -import { RpcProviderOptions, constants } from "starknet"; -import mixpanel from "mixpanel-browser"; +} from '@chakra-ui/react'; +import { Provider as JotaiProvider } from 'jotai'; +import Image from 'next/image'; +import Navbar from '@/components/Navbar'; +import { RpcProviderOptions, constants } from 'starknet'; +import mixpanel from 'mixpanel-browser'; // ! make page view more dynamic -mixpanel.init("118f29da6a372f0ccb6f541079cad56b"); +mixpanel.init('118f29da6a372f0ccb6f541079cad56b'); const theme = extendTheme({ colors: { - transparent: "rgba(0, 0, 0, 0)", - opacity_50p: "rgba(0, 0, 0, 0.5)", - color1: "rgba(86, 118, 254, 1)", - color1_65p: "rgba(86, 118, 254, 0.65)", - color1_50p: "rgba(86, 118, 254, 0.5)", - color1_35p: "rgba(86, 118, 254, 0.35)", - color1_light: "#bcc9ff80", - color2: "rgb(127 73 229)", - color2_65p: "rgba(104, 51, 205, 0.65)", - color2_50p: "rgba(104, 51, 205, 0.5)", - highlight: "#272932", // light grey - light_grey: "#9d9d9d", - disabled_text: "#818181", - disabled_bg: "#5f5f5f", - purple: "#6F4FF2", - cyan: "#22F3DF", - bg: "#1A1C26", // dark blue + transparent: 'rgba(0, 0, 0, 0)', + opacity_50p: 'rgba(0, 0, 0, 0.5)', + color1: 'rgba(86, 118, 254, 1)', + color1_65p: 'rgba(86, 118, 254, 0.65)', + color1_50p: 'rgba(86, 118, 254, 0.5)', + color1_35p: 'rgba(86, 118, 254, 0.35)', + color1_light: '#bcc9ff80', + color2: 'rgb(127 73 229)', + color2_65p: 'rgba(104, 51, 205, 0.65)', + color2_50p: 'rgba(104, 51, 205, 0.5)', + highlight: '#272932', // light grey + light_grey: '#9d9d9d', + disabled_text: '#818181', + disabled_bg: '#5f5f5f', + purple: '#6F4FF2', + cyan: '#22F3DF', + bg: '#1A1C26', // dark blue }, fontSizes: { - large: "50px", + large: '50px', }, space: { - large: "50px", + large: '50px', }, sizes: { - prose: "100%", + prose: '100%', }, components: { MenuItem: { - bg: "highlight", + bg: 'highlight', }, }, fonts: { @@ -77,7 +77,7 @@ export default function Template({ children }: { children: React.ReactNode }) { rpc: (chain) => { const args: RpcProviderOptions = { nodeUrl: - "https://rpc.nethermind.io/mainnet-juno?apikey=t1HPjhplOyEQpxqVMhpwLGuwmOlbXN0XivWUiPAxIBs0kHVK", + 'https://rpc.nethermind.io/mainnet-juno?apikey=t1HPjhplOyEQpxqVMhpwLGuwmOlbXN0XivWUiPAxIBs0kHVK', chainId: constants.StarknetChainId.SN_MAIN, }; return args; @@ -87,14 +87,14 @@ export default function Template({ children }: { children: React.ReactNode }) { // Show these connectors if the user has no connector installed. recommended: [braavos(), argent()], // Hide recommended connectors if the user has any connector installed. - includeRecommended: "onlyIfNoConnectors", + includeRecommended: 'onlyIfNoConnectors', // Randomize the order of the connectors. - order: "alphabetical", + order: 'alphabetical', }); - function getIconNode(icon: typeof import("*.svg"), alt: string) { + function getIconNode(icon: typeof import('*.svg'), alt: string) { return ( -
+
{alt}
); @@ -108,7 +108,7 @@ export default function Template({ children }: { children: React.ReactNode }) { connectors={connectors} > - + {/*
Logo
*/} - + {children} diff --git a/src/components/Filters.tsx b/src/components/Filters.tsx index f05adb1..906f157 100644 --- a/src/components/Filters.tsx +++ b/src/components/Filters.tsx @@ -1,10 +1,6 @@ import React from 'react'; import Select, { StylesConfig } from 'react-select'; -import { - ALL_FILTER, - filters, - updateFiltersAtom, -} from '@/store/pools'; +import { ALL_FILTER, filters, updateFiltersAtom } from '@/store/pools'; import * as chroma from 'chroma.ts'; import { useSetAtom } from 'jotai'; import { diff --git a/src/components/LoadingWrap.tsx b/src/components/LoadingWrap.tsx index fa73a73..6e32c7e 100644 --- a/src/components/LoadingWrap.tsx +++ b/src/components/LoadingWrap.tsx @@ -1,6 +1,6 @@ -import { WarningTwoIcon } from "@chakra-ui/icons"; -import { IconProps, Skeleton, SkeletonProps } from "@chakra-ui/react"; -import React from "react"; +import { WarningTwoIcon } from '@chakra-ui/icons'; +import { IconProps, Skeleton, SkeletonProps } from '@chakra-ui/react'; +import React from 'react'; type LoadingWrapProps = { isLoading: boolean; @@ -14,7 +14,7 @@ export default function LoadingWrap( ) { if (props.isLoading) return ; if (props.isError) - return ; + return ; return <>{props.children}; } diff --git a/src/components/TxButton.tsx b/src/components/TxButton.tsx index 168a165..d2c4572 100644 --- a/src/components/TxButton.tsx +++ b/src/components/TxButton.tsx @@ -1,13 +1,10 @@ -import CONSTANTS from "@/constants"; -import { Box, Button, ButtonProps, Spinner } from "@chakra-ui/react"; -import { - useAccount, - useContractWrite, -} from "@starknet-react/core"; -import mixpanel from "mixpanel-browser"; -import { useEffect, useMemo } from "react"; -import { isMobile } from "react-device-detect"; -import { Call } from "starknet"; +import CONSTANTS from '@/constants'; +import { Box, Button, ButtonProps, Spinner } from '@chakra-ui/react'; +import { useAccount, useContractWrite } from '@starknet-react/core'; +import mixpanel from 'mixpanel-browser'; +import { useEffect, useMemo } from 'react'; +import { isMobile } from 'react-device-detect'; +import { Call } from 'starknet'; interface TxButtonProps { text: string; @@ -18,10 +15,10 @@ interface TxButtonProps { export default function TxButton(props: TxButtonProps) { const { address } = useAccount(); const disabledStyle = { - bg: "var(--chakra-colors-disabled_bg)", - color: "var(--chakra-colors-disabled_text)", - borderColor: "var(--chakra-colors-disabled_bg)", - borderWidth: "1px", + bg: 'var(--chakra-colors-disabled_bg)', + color: 'var(--chakra-colors-disabled_text)', + borderColor: 'var(--chakra-colors-disabled_bg)', + borderWidth: '1px', }; const { writeAsync, data, status, isSuccess, isPending } = useContractWrite({ @@ -29,13 +26,13 @@ export default function TxButton(props: TxButtonProps) { }); useEffect(() => { - console.log("status", isPending, status, isSuccess); + console.log('status', isPending, status, isSuccess); }, [status]); const disabledText = useMemo(() => { if (isMobile) return CONSTANTS.MOBILE_MSG; - if (!address) return "Wallet not connected"; - return ""; + if (!address) return 'Wallet not connected'; + return ''; }, [isMobile, address]); if (disabledText) { @@ -51,7 +48,7 @@ export default function TxButton(props: TxButtonProps) { ...disabledStyle, }} isDisabled={true} - width={"100%"} + width={'100%'} > {disabledText} @@ -59,25 +56,25 @@ export default function TxButton(props: TxButtonProps) { } return ( - + ); diff --git a/src/constants.ts b/src/constants.ts index ba3118c..6b56689 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,105 +1,105 @@ -import { TokenInfo } from "./strategies/IStrategy"; -import MyNumber from "./utils/MyNumber"; +import { TokenInfo } from './strategies/IStrategy'; +import MyNumber from './utils/MyNumber'; const LOGOS = { - USDT: "/zklend/icons/tokens/usdt.svg?w=20", - USDC: "/zklend/icons/tokens/usdc.svg?w=20", - WBTC: "/zklend/icons/tokens/wbtc.svg?w=20", - ETH: "/zklend/icons/tokens/eth.svg?w=20", - STRK: "/zklend/icons/tokens/strk.svg?w=20", - DAI: "/zklend/icons/tokens/dai.svg?w=20", + USDT: '/zklend/icons/tokens/usdt.svg?w=20', + USDC: '/zklend/icons/tokens/usdc.svg?w=20', + WBTC: '/zklend/icons/tokens/wbtc.svg?w=20', + ETH: '/zklend/icons/tokens/eth.svg?w=20', + STRK: '/zklend/icons/tokens/strk.svg?w=20', + DAI: '/zklend/icons/tokens/dai.svg?w=20', }; -export type TokenName = "USDT" | "USDC" | "ETH" | "STRK" | "WBTC" | "DAI"; +export type TokenName = 'USDT' | 'USDC' | 'ETH' | 'STRK' | 'WBTC' | 'DAI'; const CONSTANTS = { - DEX_INCENTIVE_URL: "/strk-incentives/fetchFile?file=strk_grant.json", + DEX_INCENTIVE_URL: '/strk-incentives/fetchFile?file=strk_grant.json', LENDING_INCENTIVES_URL: - "/strk-incentives/fetchFile?file=prod-api/lending/lending_strk_grant.json", + '/strk-incentives/fetchFile?file=prod-api/lending/lending_strk_grant.json', LOGOS, - COMMUNITY_TG: "https://t.me/+HQ_eHaXmF-1lZDc1", + COMMUNITY_TG: 'https://t.me/+HQ_eHaXmF-1lZDc1', NOSTRA: { - LENDING_GRAPH_URL: "/nostra/app/data-yqlpb/endpoint/data/v1/action/find", + LENDING_GRAPH_URL: '/nostra/app/data-yqlpb/endpoint/data/v1/action/find', }, ZKLEND: { - BASE_APR_API: "/zklend/api/pools", + BASE_APR_API: '/zklend/api/pools', }, JEDI: { - BASE_API: "/jediswap/graphql", + BASE_API: '/jediswap/graphql', }, EKUBO: { CLAIMS_URL: - "/ekubo/airdrops/{{address}}?token=0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", + '/ekubo/airdrops/{{address}}?token=0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d', }, CONTRACTS: { - Master: "0x50314707690c31597849ed66a494fb4279dc060f8805f21593f52906846e28e", + Master: '0x50314707690c31597849ed66a494fb4279dc060f8805f21593f52906846e28e', AutoStrkFarm: - "0x541681b9ad63dff1b35f79c78d8477f64857de29a27902f7298f7b620838ea", + '0x541681b9ad63dff1b35f79c78d8477f64857de29a27902f7298f7b620838ea', AutoUsdcFarm: - "0x16912b22d5696e95ffde888ede4bd69fbbc60c5f873082857a47c543172694f", + '0x16912b22d5696e95ffde888ede4bd69fbbc60c5f873082857a47c543172694f', }, - MOBILE_MSG: "Desktop/Tablet only", + MOBILE_MSG: 'Desktop/Tablet only', }; export const TOKENS: TokenInfo[] = [ { - token: "0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", - name: "STRK", + token: '0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d', + name: 'STRK', decimals: 18, displayDecimals: 2, logo: CONSTANTS.LOGOS.STRK, - minAmount: MyNumber.fromEther("10", 18), - maxAmount: MyNumber.fromEther("10000", 18), - stepAmount: MyNumber.fromEther("10", 18), + minAmount: MyNumber.fromEther('10', 18), + maxAmount: MyNumber.fromEther('10000', 18), + stepAmount: MyNumber.fromEther('10', 18), }, { - token: "0x06d8fa671ef84f791b7f601fa79fea8f6ceb70b5fa84189e3159d532162efc21", - name: "zSTRK", + token: '0x06d8fa671ef84f791b7f601fa79fea8f6ceb70b5fa84189e3159d532162efc21', + name: 'zSTRK', decimals: 18, displayDecimals: 2, logo: CONSTANTS.LOGOS.STRK, - minAmount: MyNumber.fromEther("10", 18), - maxAmount: MyNumber.fromEther("10000", 18), - stepAmount: MyNumber.fromEther("10", 18), + minAmount: MyNumber.fromEther('10', 18), + maxAmount: MyNumber.fromEther('10000', 18), + stepAmount: MyNumber.fromEther('10', 18), }, { token: CONSTANTS.CONTRACTS.AutoStrkFarm, - name: "frmzSTRK", + name: 'frmzSTRK', decimals: 18, displayDecimals: 2, logo: CONSTANTS.LOGOS.STRK, - minAmount: MyNumber.fromEther("10", 18), - maxAmount: MyNumber.fromEther("10000", 18), - stepAmount: MyNumber.fromEther("10", 18), + minAmount: MyNumber.fromEther('10', 18), + maxAmount: MyNumber.fromEther('10000', 18), + stepAmount: MyNumber.fromEther('10', 18), }, { - token: "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8", - name: "USDC", + token: '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8', + name: 'USDC', decimals: 6, displayDecimals: 2, logo: CONSTANTS.LOGOS.USDC, - minAmount: MyNumber.fromEther("10", 6), - maxAmount: MyNumber.fromEther("10000", 6), - stepAmount: MyNumber.fromEther("10", 6), + minAmount: MyNumber.fromEther('10', 6), + maxAmount: MyNumber.fromEther('10000', 6), + stepAmount: MyNumber.fromEther('10', 6), }, { - token: "0x047ad51726d891f972e74e4ad858a261b43869f7126ce7436ee0b2529a98f486", - name: "zUSDC", + token: '0x047ad51726d891f972e74e4ad858a261b43869f7126ce7436ee0b2529a98f486', + name: 'zUSDC', decimals: 6, displayDecimals: 2, logo: CONSTANTS.LOGOS.USDC, - minAmount: MyNumber.fromEther("10", 6), - maxAmount: MyNumber.fromEther("10000", 6), - stepAmount: MyNumber.fromEther("10", 6), + minAmount: MyNumber.fromEther('10', 6), + maxAmount: MyNumber.fromEther('10000', 6), + stepAmount: MyNumber.fromEther('10', 6), }, { token: CONSTANTS.CONTRACTS.AutoUsdcFarm, - name: "frmzUSDC", + name: 'frmzUSDC', decimals: 6, displayDecimals: 2, logo: CONSTANTS.LOGOS.USDC, - minAmount: MyNumber.fromEther("10", 6), - maxAmount: MyNumber.fromEther("10000", 6), - stepAmount: MyNumber.fromEther("10", 6), + minAmount: MyNumber.fromEther('10', 6), + maxAmount: MyNumber.fromEther('10000', 6), + stepAmount: MyNumber.fromEther('10', 6), }, ]; diff --git a/src/hooks/useERC20Balance.ts b/src/hooks/useERC20Balance.ts index 39121f1..f816122 100644 --- a/src/hooks/useERC20Balance.ts +++ b/src/hooks/useERC20Balance.ts @@ -1,24 +1,24 @@ -import ERC20Abi from "@/abi/erc20.abi.json"; -import { TokenInfo } from "@/strategies/IStrategy"; -import MyNumber from "@/utils/MyNumber"; -import { useAccount, useContractRead } from "@starknet-react/core"; -import { useEffect, useMemo } from "react"; -import { BlockTag } from "starknet"; +import ERC20Abi from '@/abi/erc20.abi.json'; +import { TokenInfo } from '@/strategies/IStrategy'; +import MyNumber from '@/utils/MyNumber'; +import { useAccount, useContractRead } from '@starknet-react/core'; +import { useEffect, useMemo } from 'react'; +import { BlockTag } from 'starknet'; export function useERC20Balance(token: TokenInfo | undefined) { const { address } = useAccount(); const { data, isError, isLoading, error } = useContractRead({ - functionName: "balanceOf", - args: [address || "0x0"], + functionName: 'balanceOf', + args: [address || '0x0'], abi: ERC20Abi, - address: token?.token || "0x0", + address: token?.token || '0x0', watch: true, blockIdentifier: BlockTag.pending, }); const result = useMemo(() => { - console.log("balance", { address, data, isLoading, isError }); + console.log('balance', { address, data, isLoading, isError }); if (!address || !token) return { balance: MyNumber.fromZero(), @@ -37,7 +37,7 @@ export function useERC20Balance(token: TokenInfo | undefined) { }, [address, data, isLoading, isError, error]); useEffect(() => { - console.log("balance", { address, data, isLoading, isError, result }); + console.log('balance', { address, data, isLoading, isError, result }); }, [address, data, isLoading, isError, error, result]); return result; } diff --git a/src/store/claims.atoms.ts b/src/store/claims.atoms.ts index 6e33c88..d5e47f9 100644 --- a/src/store/claims.atoms.ts +++ b/src/store/claims.atoms.ts @@ -1,3 +1,3 @@ -import { atom } from "jotai"; +import { atom } from 'jotai'; -export const addressAtom = atom(""); +export const addressAtom = atom(''); diff --git a/src/store/haiko.store.ts b/src/store/haiko.store.ts index 1371e1a..ab9d8e2 100644 --- a/src/store/haiko.store.ts +++ b/src/store/haiko.store.ts @@ -1,18 +1,14 @@ -"use client"; +'use client'; -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Ekubo } from "./ekobu.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Ekubo } from './ekobu.store'; export class Haiko extends Ekubo { - name = "Haiko"; - link = "https://app.haiko.xyz/positions"; - logo = "https://app.haiko.xyz/favicon.ico"; - incentiveDataKey: string = "Haiko"; + name = 'Haiko'; + link = 'https://app.haiko.xyz/positions'; + logo = 'https://app.haiko.xyz/favicon.ico'; + incentiveDataKey: string = 'Haiko'; } export const haiko = new Haiko(); diff --git a/src/store/myswap.store.ts b/src/store/myswap.store.ts index 2c78cf0..27e99ae 100644 --- a/src/store/myswap.store.ts +++ b/src/store/myswap.store.ts @@ -1,21 +1,17 @@ -"use client"; +'use client'; -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Ekubo } from "./ekobu.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Ekubo } from './ekobu.store'; const fetcher = (...args: any[]) => { return fetch(args[0], args[1]).then((res) => res.json()); }; export class MySwap extends Ekubo { - name = "MySwap (v2)"; - link = "https://app.myswap.xyz/#/pools"; - logo = "https://app.myswap.xyz/favicon.ico"; - incentiveDataKey: string = "MySwap"; + name = 'MySwap (v2)'; + link = 'https://app.myswap.xyz/#/pools'; + logo = 'https://app.myswap.xyz/favicon.ico'; + incentiveDataKey: string = 'MySwap'; } export const mySwap = new MySwap(); diff --git a/src/store/nimbora.store.ts b/src/store/nimbora.store.ts index 62ff428..44c2b3a 100644 --- a/src/store/nimbora.store.ts +++ b/src/store/nimbora.store.ts @@ -1,18 +1,14 @@ -import { - PoolInfo, - ProtocolAtoms, - StrkLendingIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { ZkLend } from "./zklend.store"; +import { PoolInfo, ProtocolAtoms, StrkLendingIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { ZkLend } from './zklend.store'; export class Nimbora extends ZkLend { - name = "Nimbora"; - link = "https://app.nimbora.io/"; + name = 'Nimbora'; + link = 'https://app.nimbora.io/'; logo = - "https://assets-global.website-files.com/64f0518cbb38bb59ddd7a331/64f1ea84a753c1ed93b2c920_faviconn.png"; + 'https://assets-global.website-files.com/64f0518cbb38bb59ddd7a331/64f1ea84a753c1ed93b2c920_faviconn.png'; - incentiveDataKey = "Nimbora"; + incentiveDataKey = 'Nimbora'; } export const nimbora = new Nimbora(); diff --git a/src/store/nostradex.store.ts b/src/store/nostradex.store.ts index 2d1edd7..c274ff4 100644 --- a/src/store/nostradex.store.ts +++ b/src/store/nostradex.store.ts @@ -1,17 +1,13 @@ -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Jediswap } from "./jedi.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Jediswap } from './jedi.store'; export class NostraDex extends Jediswap { - name = "Nostra DEX"; - link = "https://app.nostra.finance/pools"; - logo = "https://app.nostra.finance/favicon.svg"; + name = 'Nostra DEX'; + link = 'https://app.nostra.finance/pools'; + logo = 'https://app.nostra.finance/favicon.svg'; - incentiveDataKey = "Nostra"; + incentiveDataKey = 'Nostra'; } export const nostraDex = new NostraDex(); diff --git a/src/store/pools.ts b/src/store/pools.ts index e348ed9..679dfbc 100644 --- a/src/store/pools.ts +++ b/src/store/pools.ts @@ -8,9 +8,7 @@ import JediAtoms, { jedi } from './jedi.store'; import MySwapAtoms, { mySwap } from './myswap.store'; import NimboraAtoms, { nimbora } from './nimbora.store'; import NostraDexAtoms, { nostraDex } from './nostradex.store'; -import NostraLendingAtoms, { - nostraLending, -} from './nostralending.store'; +import NostraLendingAtoms, { nostraLending } from './nostralending.store'; import SithswapAtoms, { sithswap } from './sithswap.store'; import StarkDefiAtoms, { starkDefi } from './starkdefi.store'; import TenkSwapAtoms, { tenkswap } from './tenkswap.store'; diff --git a/src/store/sithswap.store.ts b/src/store/sithswap.store.ts index fe57a5b..8fffb95 100644 --- a/src/store/sithswap.store.ts +++ b/src/store/sithswap.store.ts @@ -1,17 +1,13 @@ -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Jediswap } from "./jedi.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Jediswap } from './jedi.store'; export class Sithswap extends Jediswap { - name = "SithSwap"; - link = "https://app.sithswap.com/spring/"; - logo = "https://app.sithswap.com/favicon.png"; + name = 'SithSwap'; + link = 'https://app.sithswap.com/spring/'; + logo = 'https://app.sithswap.com/favicon.png'; - incentiveDataKey = "Sithswap"; + incentiveDataKey = 'Sithswap'; } export const sithswap = new Sithswap(); diff --git a/src/store/starkdefi.store.ts b/src/store/starkdefi.store.ts index 8486d8c..3b6b761 100644 --- a/src/store/starkdefi.store.ts +++ b/src/store/starkdefi.store.ts @@ -1,17 +1,13 @@ -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Jediswap } from "./jedi.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Jediswap } from './jedi.store'; export class StarkDefi extends Jediswap { - name = "StarkDefi"; - link = "https://app.starkdefi.com/#/pool"; - logo = "https://app.starkdefi.com/favicon.png"; + name = 'StarkDefi'; + link = 'https://app.starkdefi.com/#/pool'; + logo = 'https://app.starkdefi.com/favicon.png'; - incentiveDataKey = "StarkDefi"; + incentiveDataKey = 'StarkDefi'; } export const starkDefi = new StarkDefi(); diff --git a/src/store/strategies.atoms.ts b/src/store/strategies.atoms.ts index 3e32cf4..4e53b3b 100644 --- a/src/store/strategies.atoms.ts +++ b/src/store/strategies.atoms.ts @@ -1,12 +1,8 @@ -import { - SimpleStableStrategy, -} from '@/strategies/simple.stable.strat'; +import { SimpleStableStrategy } from '@/strategies/simple.stable.strat'; import { atom } from 'jotai'; import { allPoolsAtomUnSorted } from './pools'; import { AutoTokenStrategy } from '@/strategies/auto_strk.strat'; -import { - IStrategyProps, -} from '@/strategies/IStrategy'; +import { IStrategyProps } from '@/strategies/IStrategy'; import CONSTANTS from '@/constants'; export interface StrategyInfo extends IStrategyProps { diff --git a/src/store/tenkswap.store.ts b/src/store/tenkswap.store.ts index b4b3c59..d3af6a2 100644 --- a/src/store/tenkswap.store.ts +++ b/src/store/tenkswap.store.ts @@ -1,17 +1,13 @@ -import { - PoolInfo, - ProtocolAtoms, - StrkDexIncentivesAtom, -} from "./pools"; -import { atom } from "jotai"; -import { Jediswap } from "./jedi.store"; +import { PoolInfo, ProtocolAtoms, StrkDexIncentivesAtom } from './pools'; +import { atom } from 'jotai'; +import { Jediswap } from './jedi.store'; export class TenkSwap extends Jediswap { - name = "10kSwap"; - link = "https://10kswap.com/pool"; - logo = "https://10kswap.com/favicon.png"; + name = '10kSwap'; + link = 'https://10kswap.com/pool'; + logo = 'https://10kswap.com/favicon.png'; - incentiveDataKey = "10kSwap"; + incentiveDataKey = '10kSwap'; } export const tenkswap = new TenkSwap(); diff --git a/src/utils.ts b/src/utils.ts index f9e6599..0d25544 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ -import { MenuItemProps, MenuListProps } from "@chakra-ui/react"; -import { num } from "starknet"; +import { MenuItemProps, MenuListProps } from '@chakra-ui/react'; +import { num } from 'starknet'; export function getUniqueStrings(arr: Array) { const _arr: string[] = []; @@ -22,7 +22,7 @@ export function getUnique(arr: Array, uniqueField: string) { } export function getUniqueById(arr: Array) { - return getUnique(arr, "id"); + return getUnique(arr, 'id'); } export function capitalize(str: string) { @@ -37,22 +37,22 @@ export function shortAddress(_address: string) { export function standariseAddress(address: string | bigint) { let _a = address; if (!address) { - _a = "0"; + _a = '0'; } const a = num.getHexString(num.getDecimalString(_a.toString())); return a; } export const MyMenuListProps: MenuListProps = { - bg: "highlight", - color: "white", - borderColor: "bg", + bg: 'highlight', + color: 'white', + borderColor: 'bg', padding: 0, }; export const MyMenuItemProps: MenuItemProps = { - bg: "highlight", + bg: 'highlight', _hover: { - bg: "bg", + bg: 'bg', }, };