diff --git a/src/components/App.tsx b/src/components/App.tsx
index 34eb2bdde..2920134f2 100755
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -1,11 +1,10 @@
-import React from "react";
import { Navigate, Outlet, Route, Routes } from "react-router-dom";
import { Heading } from "@chakra-ui/react";
import loadable from "@loadable/component";
import FullPageSpinner from "./shared/FullPageSpinner";
import { Pool } from "../utils/poolUtils";
import Layout from "./shared/Layout";
-import Home from "./pages/Home/Home";
+import React from "react";
const MultiPoolPortal = loadable(
() => import(/* webpackPrefetch: true */ "./pages/MultiPoolPortal"),
@@ -63,13 +62,6 @@ const FusePoolCreatePage = loadable(
}
);
-const RSSAssetsPage = loadable(
- () => import(/* webpackPrefetch: true */ "./pages/RSSAssetsPage"),
- {
- fallback: ,
- }
-);
-
const Pool2Page = loadable(
() => import(/* webpackPrefetch: true */ "./pages/Pool2/Pool2Page"),
{
@@ -119,10 +111,6 @@ const App = React.memo(() => {
} />
- }>
- } />
-
-
} />
} />
@@ -136,7 +124,6 @@ const App = React.memo(() => {
} />
} />
- } />
} />
diff --git a/src/components/pages/ErrorPage.tsx b/src/components/pages/ErrorPage.tsx
index dd9a995d8..672d61b63 100644
--- a/src/components/pages/ErrorPage.tsx
+++ b/src/components/pages/ErrorPage.tsx
@@ -1,5 +1,4 @@
/* istanbul ignore file */
-import React from "react";
import { Code, Box, Heading, Text, Link } from "@chakra-ui/react";
diff --git a/src/components/pages/Fuse/FusePoolsPage.tsx b/src/components/pages/Fuse/FusePoolsPage.tsx
index eca42efd1..84a08fbe0 100644
--- a/src/components/pages/Fuse/FusePoolsPage.tsx
+++ b/src/components/pages/Fuse/FusePoolsPage.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Avatar, AvatarGroup, Link, Spinner, Text } from "@chakra-ui/react";
import { Center, Column, Row, useIsMobile } from "buttered-chakra";
import { useTranslation } from "react-i18next";
@@ -21,6 +20,7 @@ import { letterScore, usePoolRSS } from "hooks/useRSS";
import { SimpleTooltip } from "components/shared/SimpleTooltip";
import { useFusePools } from "hooks/fuse/useFusePools";
import Footer from "components/shared/Footer";
+import React from "react";
const FusePoolsPage = React.memo(() => {
const { isAuthed } = useRari();
diff --git a/src/components/pages/Fuse/FuseStatsBar.tsx b/src/components/pages/Fuse/FuseStatsBar.tsx
index bd595ef68..afa4d1658 100644
--- a/src/components/pages/Fuse/FuseStatsBar.tsx
+++ b/src/components/pages/Fuse/FuseStatsBar.tsx
@@ -1,6 +1,6 @@
import { Heading } from "@chakra-ui/react";
import { RowOrColumn, Column, Center } from "buttered-chakra";
-import React, { ReactNode } from "react";
+import { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { useRari } from "context/RariContext";
import { useIsSmallScreen } from "hooks/useIsSmallScreen";
diff --git a/src/components/pages/Fuse/FuseTabBar.tsx b/src/components/pages/Fuse/FuseTabBar.tsx
index 7937d1c59..a3dee7ec2 100644
--- a/src/components/pages/Fuse/FuseTabBar.tsx
+++ b/src/components/pages/Fuse/FuseTabBar.tsx
@@ -1,7 +1,6 @@
import { DeleteIcon, SmallAddIcon } from "@chakra-ui/icons";
import { ButtonGroup, Input, Link, Text } from "@chakra-ui/react";
import { RowOrColumn, Row, Center } from "buttered-chakra";
-import React from "react";
import { useTranslation } from "react-i18next";
import { useLocation, useNavigate, useParams } from "react-router-dom";
import { useIsSmallScreen } from "../../../hooks/useIsSmallScreen";
diff --git a/src/components/pages/Fuse/Modals/AddAssetModal.tsx b/src/components/pages/Fuse/Modals/AddAssetModal.tsx
index 856099467..5b8fcabf0 100644
--- a/src/components/pages/Fuse/Modals/AddAssetModal.tsx
+++ b/src/components/pages/Fuse/Modals/AddAssetModal.tsx
@@ -13,7 +13,7 @@ import {
useToast,
} from "@chakra-ui/react";
import { Column, Center } from "buttered-chakra";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import DashboardBox, {
diff --git a/src/components/pages/Fuse/Modals/PoolModal/AmountSelect.tsx b/src/components/pages/Fuse/Modals/PoolModal/AmountSelect.tsx
index b124d1d2f..7526a9034 100644
--- a/src/components/pages/Fuse/Modals/PoolModal/AmountSelect.tsx
+++ b/src/components/pages/Fuse/Modals/PoolModal/AmountSelect.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import { Row, Column, Center, useIsMobile } from "buttered-chakra";
import LogRocket from "logrocket";
@@ -802,141 +802,140 @@ const StatsColumn = ({
const { rari, fuse } = useRari();
- const {
- data: updatedAssets,
- }: UseQueryResult = useQuery(
- mode + " " + index + " " + JSON.stringify(assets) + " " + amount,
- async () => {
- const ethPrice: number = fuse.web3.utils.fromWei(
- await rari.getEthUsdPriceBN()
- ) as any;
-
- const assetToBeUpdated = assets[index];
+ const { data: updatedAssets }: UseQueryResult =
+ useQuery(
+ mode + " " + index + " " + JSON.stringify(assets) + " " + amount,
+ async () => {
+ const ethPrice: number = fuse.web3.utils.fromWei(
+ await rari.getEthUsdPriceBN()
+ ) as any;
- const interestRateModel = await fuse.getInterestRateModel(
- assetToBeUpdated.cToken
- );
+ const assetToBeUpdated = assets[index];
- let updatedAsset: USDPricedFuseAsset;
- if (mode === Mode.SUPPLY) {
- const supplyBalance =
- parseInt(assetToBeUpdated.supplyBalance as any) + amount;
-
- const totalSupply =
- parseInt(assetToBeUpdated.totalSupply as any) + amount;
-
- updatedAsset = {
- ...assetToBeUpdated,
-
- supplyBalance,
- supplyBalanceUSD:
- ((supplyBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
- ethPrice,
-
- totalSupply,
- supplyRatePerBlock: interestRateModel.getSupplyRate(
- fuse.web3.utils.toBN(
- totalSupply > 0
- ? new BigNumber(assetToBeUpdated.totalBorrow)
- .dividedBy(totalSupply.toString())
- .multipliedBy(1e18)
- .toFixed(0)
- : 0
- )
- ),
- };
- } else if (mode === Mode.WITHDRAW) {
- const supplyBalance =
- parseInt(assetToBeUpdated.supplyBalance as any) - amount;
-
- const totalSupply =
- parseInt(assetToBeUpdated.totalSupply as any) - amount;
-
- updatedAsset = {
- ...assetToBeUpdated,
-
- supplyBalance,
- supplyBalanceUSD:
- ((supplyBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
- ethPrice,
-
- totalSupply,
- supplyRatePerBlock: interestRateModel.getSupplyRate(
- fuse.web3.utils.toBN(
- totalSupply > 0
- ? new BigNumber(assetToBeUpdated.totalBorrow)
- .dividedBy(totalSupply.toString())
- .multipliedBy(1e18)
- .toFixed(0)
- : 0
- )
- ),
- };
- } else if (mode === Mode.BORROW) {
- const borrowBalance =
- parseInt(assetToBeUpdated.borrowBalance as any) + amount;
-
- const totalBorrow =
- parseInt(assetToBeUpdated.totalBorrow as any) + amount;
-
- updatedAsset = {
- ...assetToBeUpdated,
-
- borrowBalance,
- borrowBalanceUSD:
- ((borrowBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
- ethPrice,
-
- totalBorrow,
- borrowRatePerBlock: interestRateModel.getBorrowRate(
- fuse.web3.utils.toBN(
- assetToBeUpdated.totalSupply > 0
- ? new BigNumber(totalBorrow.toString())
- .dividedBy(assetToBeUpdated.totalSupply)
- .multipliedBy(1e18)
- .toFixed(0)
- : 0
- )
- ),
- };
- } else if (mode === Mode.REPAY) {
- const borrowBalance =
- parseInt(assetToBeUpdated.borrowBalance as any) - amount;
-
- const totalBorrow =
- parseInt(assetToBeUpdated.totalBorrow as any) - amount;
-
- updatedAsset = {
- ...assetToBeUpdated,
-
- borrowBalance,
- borrowBalanceUSD:
- ((borrowBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
- ethPrice,
-
- totalBorrow,
- borrowRatePerBlock: interestRateModel.getBorrowRate(
- fuse.web3.utils.toBN(
- assetToBeUpdated.totalSupply > 0
- ? new BigNumber(totalBorrow.toString())
- .dividedBy(assetToBeUpdated.totalSupply)
- .multipliedBy(1e18)
- .toFixed(0)
- : 0
- )
- ),
- };
- }
+ const interestRateModel = await fuse.getInterestRateModel(
+ assetToBeUpdated.cToken
+ );
- return assets.map((value, _index) => {
- if (_index === index) {
- return updatedAsset;
- } else {
- return value;
+ let updatedAsset: USDPricedFuseAsset;
+ if (mode === Mode.SUPPLY) {
+ const supplyBalance =
+ parseInt(assetToBeUpdated.supplyBalance as any) + amount;
+
+ const totalSupply =
+ parseInt(assetToBeUpdated.totalSupply as any) + amount;
+
+ updatedAsset = {
+ ...assetToBeUpdated,
+
+ supplyBalance,
+ supplyBalanceUSD:
+ ((supplyBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
+ ethPrice,
+
+ totalSupply,
+ supplyRatePerBlock: interestRateModel.getSupplyRate(
+ fuse.web3.utils.toBN(
+ totalSupply > 0
+ ? new BigNumber(assetToBeUpdated.totalBorrow)
+ .dividedBy(totalSupply.toString())
+ .multipliedBy(1e18)
+ .toFixed(0)
+ : 0
+ )
+ ),
+ };
+ } else if (mode === Mode.WITHDRAW) {
+ const supplyBalance =
+ parseInt(assetToBeUpdated.supplyBalance as any) - amount;
+
+ const totalSupply =
+ parseInt(assetToBeUpdated.totalSupply as any) - amount;
+
+ updatedAsset = {
+ ...assetToBeUpdated,
+
+ supplyBalance,
+ supplyBalanceUSD:
+ ((supplyBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
+ ethPrice,
+
+ totalSupply,
+ supplyRatePerBlock: interestRateModel.getSupplyRate(
+ fuse.web3.utils.toBN(
+ totalSupply > 0
+ ? new BigNumber(assetToBeUpdated.totalBorrow)
+ .dividedBy(totalSupply.toString())
+ .multipliedBy(1e18)
+ .toFixed(0)
+ : 0
+ )
+ ),
+ };
+ } else if (mode === Mode.BORROW) {
+ const borrowBalance =
+ parseInt(assetToBeUpdated.borrowBalance as any) + amount;
+
+ const totalBorrow =
+ parseInt(assetToBeUpdated.totalBorrow as any) + amount;
+
+ updatedAsset = {
+ ...assetToBeUpdated,
+
+ borrowBalance,
+ borrowBalanceUSD:
+ ((borrowBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
+ ethPrice,
+
+ totalBorrow,
+ borrowRatePerBlock: interestRateModel.getBorrowRate(
+ fuse.web3.utils.toBN(
+ assetToBeUpdated.totalSupply > 0
+ ? new BigNumber(totalBorrow.toString())
+ .dividedBy(assetToBeUpdated.totalSupply)
+ .multipliedBy(1e18)
+ .toFixed(0)
+ : 0
+ )
+ ),
+ };
+ } else if (mode === Mode.REPAY) {
+ const borrowBalance =
+ parseInt(assetToBeUpdated.borrowBalance as any) - amount;
+
+ const totalBorrow =
+ parseInt(assetToBeUpdated.totalBorrow as any) - amount;
+
+ updatedAsset = {
+ ...assetToBeUpdated,
+
+ borrowBalance,
+ borrowBalanceUSD:
+ ((borrowBalance * assetToBeUpdated.underlyingPrice) / 1e36) *
+ ethPrice,
+
+ totalBorrow,
+ borrowRatePerBlock: interestRateModel.getBorrowRate(
+ fuse.web3.utils.toBN(
+ assetToBeUpdated.totalSupply > 0
+ ? new BigNumber(totalBorrow.toString())
+ .dividedBy(assetToBeUpdated.totalSupply)
+ .multipliedBy(1e18)
+ .toFixed(0)
+ : 0
+ )
+ ),
+ };
}
- });
- }
- );
+
+ return assets.map((value, _index) => {
+ if (_index === index) {
+ return updatedAsset;
+ } else {
+ return value;
+ }
+ });
+ }
+ );
const asset = assets[index];
const updatedAsset = updatedAssets ? updatedAssets[index] : null;
diff --git a/src/components/pages/Fuse/Modals/PoolModal/index.tsx b/src/components/pages/Fuse/Modals/PoolModal/index.tsx
index 350a60c0b..06b716f9a 100644
--- a/src/components/pages/Fuse/Modals/PoolModal/index.tsx
+++ b/src/components/pages/Fuse/Modals/PoolModal/index.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { Modal, ModalOverlay, ModalContent } from "@chakra-ui/react";
import AmountSelect from "./AmountSelect";
diff --git a/src/components/pages/Home/Home.tsx b/src/components/pages/Home/Home.tsx
deleted file mode 100644
index 00f9d8eeb..000000000
--- a/src/components/pages/Home/Home.tsx
+++ /dev/null
@@ -1,266 +0,0 @@
-import React, { useMemo } from "react";
-import { Input, InputGroup, InputLeftElement } from "@chakra-ui/input";
-import { Heading, Text, Link, SimpleGrid, Box } from "@chakra-ui/react";
-import { Column, Row } from "buttered-chakra";
-import { useIsSmallScreen } from "hooks/useIsSmallScreen";
-import NewHeader from "components/shared/Header2/NewHeader";
-import Marquee from "react-fast-marquee";
-import HomeFuseCard from "./HomeFuseCard";
-import { Link as RouterLink } from "react-router-dom";
-
-import { motion } from "framer-motion";
-
-import { smallStringUsdFormatter } from "utils/bigUtils";
-
-import { APYWithRefreshMovingStat } from "components/shared/MovingStat";
-import { useTVLFetchers } from "hooks/useTVL";
-import HomeVaultCard from "./HomeVaultCard";
-import Footer from "components/shared/Footer";
-import OpportunityCard from "./OpportunityCard";
-import HomeCarousel from "./HomeCarousel";
-
-// constants
-import {
- HOMEPAGE_FUSE_POOLS,
- HOMEPAGE_OPPORTUNIES,
- HOMEPAGE_EARN_VAULTS,
-} from "constants/homepage";
-import { useFusePoolsData } from "hooks/useFusePoolData";
-import { SaffronProvider } from "../Tranches/SaffronContext";
-import { SearchIcon } from "@chakra-ui/icons";
-import DashboardBox from "components/shared/DashboardBox";
-
-const Home = React.memo(() => {
- // const { isAuthed } = useRari();
- const isMobile = useIsSmallScreen();
-
- const { getNumberTVL } = useTVLFetchers();
-
- const pools = useFusePoolsData(
- HOMEPAGE_FUSE_POOLS.map(({ id }: { id: number }) => id)
- );
-
- return (
-
-
- {/* Header */}
-
-
- {/* Hero */}
-
-
-
-
- Easily earn, lend
and borrow
-
-
-
-
- }
- />
-
-
-
-
-
-
- {/* Fuse Pools */}
-
-
-
-
- {/* Opportunities */}
-
-
-
- Explore Opportunities
-
-
- View All
-
-
-
-
-
- {HOMEPAGE_OPPORTUNIES.slice(
- 0,
- isMobile ? 4 : HOMEPAGE_OPPORTUNIES.length
- ).map((opportunity, i) => (
-
- ))}
-
-
-
-
- {/* Factoid Carousel */}
-
-
-
-
-
-
- Discover infinite possibilities across the Rari Capital
- Ecosystem
-
-
-
-
-
-
-
-
-
- {/* Easily Earn (Vaults) */}
-
-
-
- Easily Earn
-
-
-
- View All
-
-
-
-
-
-
-
-
- {/* Explore Today */}
-
-
-
-
- );
-});
-
-export default Home;
diff --git a/src/components/pages/Home/HomeCarousel.tsx b/src/components/pages/Home/HomeCarousel.tsx
deleted file mode 100644
index 48fe81cfa..000000000
--- a/src/components/pages/Home/HomeCarousel.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import React from "react";
-import { Box, Heading } from "@chakra-ui/layout";
-
-import "react-responsive-carousel/lib/styles/carousel.min.css"; // requires a loader
-import { Carousel } from "react-responsive-carousel";
-import { Column } from "buttered-chakra";
-import { useIsSmallScreen } from "hooks/useIsSmallScreen";
-import { FusePoolData } from "utils/fetchFusePoolData";
-
-const HomeCarousel = ({ pools }: { pools: FusePoolData[] | null }) => {
- const isMobile = useIsSmallScreen();
-
- return (
-
-
-
-
- The Rari Capital Ecosystem currently has 1 Bajilion dollars earning
- 18.5% yield.
-
-
-
-
- The Rari Capital Ecosystem currently has 1 Bajilion dollars earning
- 18.5% yield.
-
-
-
-
- The Rari Capital Ecosystem currently has 1 Bajilion dollars earning
- 18.5% yield.
-
-
-
-
- );
-};
-
-export default HomeCarousel;
diff --git a/src/components/pages/Home/HomeFuseCard.tsx b/src/components/pages/Home/HomeFuseCard.tsx
deleted file mode 100644
index 5782b82d2..000000000
--- a/src/components/pages/Home/HomeFuseCard.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import React, { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
-
-import {
- AvatarGroup,
- Avatar,
- Box,
- Heading,
- Link,
- Text,
-} from "@chakra-ui/react";
-import {
- FusePoolData,
- USDPricedFuseAssetWithTokenData,
-} from "utils/fetchFusePoolData";
-
-import { motion } from "framer-motion";
-import { HomepageFusePool, HOMEPAGE_FUSE_POOLS } from "constants/homepage";
-import DashboardBox from "components/shared/DashboardBox";
-
-const HomeFuseCard = ({ pool }: { pool: FusePoolData }) => {
- const { title, subtitle }: HomepageFusePool = useMemo(
- () => HOMEPAGE_FUSE_POOLS.find((p) => p.id === pool.id)!,
- [pool]
- );
-
- const assetsSubtitle = useMemo(() => {
- const NUM = 3;
-
- const symbols: string[] = [];
-
- pool.assets.forEach((a, i) => {
- const asset = a as USDPricedFuseAssetWithTokenData;
- const { symbol } = asset?.tokenData ?? {};
- if (i < NUM && symbol) symbols.push(symbol!);
- });
-
- let caption;
- if (pool.assets.length <= 3) {caption = symbols.join(", ")}
- else {
- caption = `${symbols.join(", ")}, and ${pool.assets.length - NUM} others`;
- }
-
- return caption;
- }, [pool]);
-
- return (
-
-
-
-
-
- {pool.assets.slice(0, 3).map((asset) => {
- const _asset = asset as USDPricedFuseAssetWithTokenData;
- return (
-
- );
- })}
-
- {title ?? pool.name}
-
- {subtitle ?? assetsSubtitle}
-
-
-
-
- );
-};
-
-export default HomeFuseCard;
diff --git a/src/components/pages/Home/HomeSection.tsx b/src/components/pages/Home/HomeSection.tsx
deleted file mode 100644
index b7603664a..000000000
--- a/src/components/pages/Home/HomeSection.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import React, { ReactNode } from "react";
-import { Row } from "buttered-chakra";
-
-const HomeSection = ({ children, ...rowProps }: { children: ReactNode[] }) => {
- return (
-
- {children}
-
- );
-};
-
-export default HomeSection;
diff --git a/src/components/pages/Home/HomeVaultCard.tsx b/src/components/pages/Home/HomeVaultCard.tsx
deleted file mode 100644
index c6e9ed1e6..000000000
--- a/src/components/pages/Home/HomeVaultCard.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import React, { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
-import { Box, Heading, Link, Image, Text } from "@chakra-ui/react";
-import { Column } from "buttered-chakra";
-
-import { HomepageOpportunity } from "constants/homepage";
-import { useOpportunitySubtitle } from "hooks/homepage/useOpportunitySubtitle";
-import { getOpportunityLink } from "utils/homepage";
-
-const HomeVaultCard = ({
- opportunity,
-}: {
- opportunity: HomepageOpportunity;
-}) => {
- const subheading = useOpportunitySubtitle(opportunity);
- const link = useMemo(() => getOpportunityLink(opportunity), [opportunity]);
-
- return (
-
-
- {opportunity.title}
- {subheading}
-
-
-
-
-
- );
-};
-
-export default HomeVaultCard;
diff --git a/src/components/pages/Home/OpportunityCard.tsx b/src/components/pages/Home/OpportunityCard.tsx
deleted file mode 100644
index 66c5fc291..000000000
--- a/src/components/pages/Home/OpportunityCard.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import { useMemo } from "react";
-import { Link as RouterLink } from "react-router-dom";
-import { Box, Heading, Text, Link, Image, LinkBox } from "@chakra-ui/react";
-import { Column, Row } from "buttered-chakra";
-
-import { HomepageOpportunity } from "constants/homepage";
-import { useOpportunitySubtitle } from "hooks/homepage/useOpportunitySubtitle";
-import { getOpportunityLink } from "utils/homepage";
-
-const OpportunityCard = ({
- opportunity,
-}: {
- opportunity: HomepageOpportunity;
-}) => {
- const subheading = useOpportunitySubtitle(opportunity);
- const link = useMemo(() => getOpportunityLink(opportunity), [opportunity]);
-
- return (
-
-
-
-
- {opportunity.title}
- {subheading}
-
- {opportunity.subtitle}
-
-
-
-
-
-
-
-
- );
-};
-
-export default OpportunityCard;
diff --git a/src/components/pages/MoonpayModal.tsx b/src/components/pages/MoonpayModal.tsx
index ccf779bbb..3ed0c0025 100644
--- a/src/components/pages/MoonpayModal.tsx
+++ b/src/components/pages/MoonpayModal.tsx
@@ -1,5 +1,5 @@
import { Modal, ModalOverlay, ModalContent } from "@chakra-ui/react";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
interface Props {
isOpen: boolean;
diff --git a/src/components/pages/MultiPoolPortal.tsx b/src/components/pages/MultiPoolPortal.tsx
index eb719e16a..976ac8cc0 100644
--- a/src/components/pages/MultiPoolPortal.tsx
+++ b/src/components/pages/MultiPoolPortal.tsx
@@ -165,10 +165,11 @@ const GovernanceStats = () => {
);
const { data: rgtSupply } = useQuery("rgtSupply", async () => {
- //@ts-ignore
- const rawSupply = await rari.governance.contracts.RariGovernanceToken.methods
- .totalSupply()
- .call();
+ const rawSupply =
+ //@ts-ignore
+ await rari.governance.contracts.RariGovernanceToken.methods
+ .totalSupply()
+ .call();
return smallStringUsdFormatter((parseFloat(rawSupply) / 1e18).toFixed(0))
.replace("$", "")
@@ -214,10 +215,8 @@ const FundStats = () => {
const { isAuthed } = useRari();
- const {
- isLoading: isBalanceLoading,
- data: balanceData,
- } = useTotalPoolsBalance();
+ const { isLoading: isBalanceLoading, data: balanceData } =
+ useTotalPoolsBalance();
const { getNumberTVL } = useTVLFetchers();
@@ -367,9 +366,8 @@ const PoolDetailCard = ({ pool }: { pool: Pool }) => {
const authedOpenModal = useAuthedCallback(openDepositModal);
- const { data: balanceData, isLoading: isPoolBalanceLoading } = usePoolBalance(
- pool
- );
+ const { data: balanceData, isLoading: isPoolBalanceLoading } =
+ usePoolBalance(pool);
const poolAPY = usePoolAPY(pool);
diff --git a/src/components/pages/Pool2/Pool2Modal/AmountSelect.tsx b/src/components/pages/Pool2/Pool2Modal/AmountSelect.tsx
index 271b24f41..4a86f314c 100644
--- a/src/components/pages/Pool2/Pool2Modal/AmountSelect.tsx
+++ b/src/components/pages/Pool2/Pool2Modal/AmountSelect.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import { Row, Column } from "buttered-chakra";
import {
@@ -275,9 +275,10 @@ const TokenNameAndMaxButton = ({
maxBN = balance;
} else {
- const deposited = await rari.governance.rgt.sushiSwapDistributions.stakingBalanceOf(
- address
- );
+ const deposited =
+ await rari.governance.rgt.sushiSwapDistributions.stakingBalanceOf(
+ address
+ );
maxBN = deposited;
}
diff --git a/src/components/pages/Pool2/Pool2Modal/OptionsMenu.tsx b/src/components/pages/Pool2/Pool2Modal/OptionsMenu.tsx
index 89f3e61e5..55d086e95 100644
--- a/src/components/pages/Pool2/Pool2Modal/OptionsMenu.tsx
+++ b/src/components/pages/Pool2/Pool2Modal/OptionsMenu.tsx
@@ -1,5 +1,3 @@
-import React from "react";
-
import { Button } from "@chakra-ui/react";
import { Fade } from "react-awesome-reveal";
diff --git a/src/components/pages/Pool2/Pool2Modal/index.tsx b/src/components/pages/Pool2/Pool2Modal/index.tsx
index 56c9fb218..2f35a2114 100644
--- a/src/components/pages/Pool2/Pool2Modal/index.tsx
+++ b/src/components/pages/Pool2/Pool2Modal/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import { Modal, ModalOverlay, ModalContent } from "@chakra-ui/react";
import AmountSelect from "./AmountSelect";
diff --git a/src/components/pages/Pool2/Pool2Page.tsx b/src/components/pages/Pool2/Pool2Page.tsx
index bf772d6fa..3e2679918 100644
--- a/src/components/pages/Pool2/Pool2Page.tsx
+++ b/src/components/pages/Pool2/Pool2Page.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import {
useInterval,
useDisclosure,
diff --git a/src/components/pages/RSSAssetsPage.tsx b/src/components/pages/RSSAssetsPage.tsx
deleted file mode 100644
index df9c61b42..000000000
--- a/src/components/pages/RSSAssetsPage.tsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import {
- Column,
- PercentageSize,
- Row,
- useSpacedLayout,
- Center,
- useWindowSize,
- useIsMobile,
-} from "buttered-chakra";
-import React, { useState } from "react";
-import { useQuery } from "react-query";
-import { useRari } from "../../context/RariContext";
-
-import { Header, HeaderHeightWithTopPadding } from "../shared/Header";
-import {
- Text,
- Image,
- Spinner,
- SimpleGrid,
- Heading,
- Input,
- IconButton,
- useToast,
- Link,
-} from "@chakra-ui/react";
-import { useTokenData } from "../../hooks/useTokenData";
-import DashboardBox, { DASHBOARD_BOX_SPACING } from "../shared/DashboardBox";
-import { useTranslation } from "react-i18next";
-import { SimpleTooltip } from "../shared/SimpleTooltip";
-import { SearchIcon } from "@chakra-ui/icons";
-import { useAssetRSS } from "../../hooks/useRSS";
-
-const RSSAssetsPage = React.memo(() => {
- const { isAuthed } = useRari();
-
- const { data: tokenList } = useQuery(
- "topCoins",
- () => {
- return fetch(
- "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2",
- {
- method: "post",
-
- body: JSON.stringify({
- query: `{
- tokens(first: 50, orderBy: tradeVolumeUSD, orderDirection: desc) {
- id
- }
- }`,
- }),
-
- headers: { "Content-Type": "application/json" },
- }
- )
- .then((res) => res.json())
- .then((res) => res.data.tokens) as Promise<{ id: string }[]>;
- },
- {
- refetchOnMount: false,
- refetchOnWindowFocus: false,
- refetchOnReconnect: false,
- }
- );
-
- const { height } = useWindowSize();
-
- const isMobile = useIsMobile();
-
- const {
- childSizes: [, bodySize],
- } = useSpacedLayout({
- parentHeight: height,
- spacing: DASHBOARD_BOX_SPACING.asNumber(),
- childSizes: [HeaderHeightWithTopPadding, new PercentageSize(1)],
- });
-
- const [customAssets, setCustomAssets] = useState<{ id: string }[]>([]);
-
- const { t } = useTranslation();
-
- return (
-
-
-
-
- {t("Asset RSS")}
-
-
-
- {t(
- "Rari Safety Scores for top ERC20 assets. Click here for information on the calculations."
- )}
-
-
-
- {
- const asset = { id: address };
-
- if (
- !customAssets.some((customAsset) => customAsset.id === address)
- ) {
- setCustomAssets((past) => [asset, ...past]);
- }
- }}
- />
-
- {tokenList
- ? [...customAssets, ...tokenList].map((token) => (
-
- ))
- : null}
-
-
-
- );
-});
-
-const SearchBar = ({ onSearch }: { onSearch: (address: string) => any }) => {
- const [address, setAddress] = useState("");
-
- const { rari } = useRari();
-
- const toast = useToast();
-
- const { t } = useTranslation();
-
- return (
-
- setAddress(event.target.value)}
- />
-
- {
- if (rari.web3.utils.isAddress(address)) {
- onSearch(address);
- } else {
- toast({
- title: "Error!",
- description: t("This is not a valid Ethereum address!"),
- status: "error",
- duration: 2000,
- isClosable: true,
- position: "top-right",
- });
- }
- }}
- icon={}
- bg="#FFF"
- boxSize="40px"
- aria-label="Search"
- />
-
- );
-};
-
-const TokenRSS = ({ address }: { address: string }) => {
- const tokenData = useTokenData(address);
-
- const rss = useAssetRSS(address);
-
- const { t } = useTranslation();
-
- return (
-
- {tokenData && rss ? (
-
-
-
- {t("Market Cap")}: {rss.mcap.toFixed(0)} / 33
-
-
- {t("Liquidity")}: {rss.liquidity.toFixed(1)} / 32
-
-
- {t("Volatility")}: {rss.volatility.toFixed(1)} / 20
-
-
- {t("Swap Volume")}: {rss.swapCount.toFixed(0)} / 7
-
-
- {t("Exchanges")}: {rss.exchanges.toFixed(1)} / 3
-
-
- {t("Transfers")}: {rss.transfers.toFixed(2)} / 3
-
-
- {t("Social Media")}: {rss.coingeckoMetadata.toFixed(0)} / 2
-
-
-
-
-
-
-
-
- {rss.totalScore.toFixed(0)}%
-
-
-
-
- {tokenData!.symbol ?? "NOT_A_TOKEN"}
-
-
-
- ) : (
-
-
-
- )}
-
- );
-};
-
-export default RSSAssetsPage;
diff --git a/src/components/pages/RariDepositModal/AmountSelect.tsx b/src/components/pages/RariDepositModal/AmountSelect.tsx
index 5f9a294b4..55fe060b5 100644
--- a/src/components/pages/RariDepositModal/AmountSelect.tsx
+++ b/src/components/pages/RariDepositModal/AmountSelect.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import { Row, Column, Center } from "buttered-chakra";
import SmallWhiteCircle from "../../../static/small-white-circle.png";
@@ -205,30 +205,24 @@ const AmountSelect = ({
let slippage: BN;
if (mode === Mode.DEPOSIT) {
- const [
- amountToBeAdded,
- ,
- _slippage,
- ] = (await pool.deposits.validateDeposit(
- token.symbol,
- amountBN,
- address,
- true
- )) as BN[];
+ const [amountToBeAdded, , _slippage] =
+ (await pool.deposits.validateDeposit(
+ token.symbol,
+ amountBN,
+ address,
+ true
+ )) as BN[];
quote = amountToBeAdded;
slippage = _slippage;
} else {
- const [
- amountToBeRemoved,
- ,
- _slippage,
- ] = (await pool.withdrawals.validateWithdrawal(
- token.symbol,
- amountBN,
- address,
- true
- )) as BN[];
+ const [amountToBeRemoved, , _slippage] =
+ (await pool.withdrawals.validateWithdrawal(
+ token.symbol,
+ amountBN,
+ address,
+ true
+ )) as BN[];
quote = amountToBeRemoved;
slippage = _slippage;
@@ -461,9 +455,9 @@ const TokenNameAndMaxButton = ({
// Subtract gas from ETH max
// Ex: 100 (in GWEI)
- const { standard } = await fetch(
- "https://gasprice.poa.network"
- ).then((res) => res.json());
+ const { standard } = await fetch("https://gasprice.poa.network").then(
+ (res) => res.json()
+ );
const gasPrice = rari.web3.utils.toBN(
// @ts-ignore For some reason it's returning a string not a BN
diff --git a/src/components/pages/RariDepositModal/OptionsMenu.tsx b/src/components/pages/RariDepositModal/OptionsMenu.tsx
index 9896ec6a0..1fa43e2b0 100644
--- a/src/components/pages/RariDepositModal/OptionsMenu.tsx
+++ b/src/components/pages/RariDepositModal/OptionsMenu.tsx
@@ -1,5 +1,3 @@
-import React from "react";
-
import { Button } from "@chakra-ui/react";
import { Fade } from "react-awesome-reveal";
diff --git a/src/components/pages/RariDepositModal/index.tsx b/src/components/pages/RariDepositModal/index.tsx
index 2d57e3aad..9c0f435a3 100644
--- a/src/components/pages/RariDepositModal/index.tsx
+++ b/src/components/pages/RariDepositModal/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect } from "react";
+import { useState, useEffect } from "react";
import { Modal, ModalOverlay, ModalContent } from "@chakra-ui/react";
import TokenSelect from "./TokenSelect";
diff --git a/src/components/pages/Stats/StatsEarnSection.tsx b/src/components/pages/Stats/StatsEarnSection.tsx
index d5812166a..4ad128a39 100644
--- a/src/components/pages/Stats/StatsEarnSection.tsx
+++ b/src/components/pages/Stats/StatsEarnSection.tsx
@@ -1,4 +1,4 @@
-import React, { useMemo } from "react";
+import { useMemo } from "react";
import {
Table,
Text,
diff --git a/src/components/pages/Stats/StatsFuseSection.tsx b/src/components/pages/Stats/StatsFuseSection.tsx
index 5b3e08eb2..7ba135962 100644
--- a/src/components/pages/Stats/StatsFuseSection.tsx
+++ b/src/components/pages/Stats/StatsFuseSection.tsx
@@ -1,4 +1,4 @@
-import React, { useMemo } from "react";
+import { useMemo } from "react";
import {
Avatar,
Box,
@@ -48,9 +48,8 @@ const Fuse = () => {
fusePoolsData?.map((pool) => pool?.assets) ?? null;
const maxBorrows = useBorrowLimits(assetsArray);
- const {
- tokensDataMap,
- }: { tokensDataMap: TokensDataHash } = useAssetsMapWithTokenData(assetsArray);
+ const { tokensDataMap }: { tokensDataMap: TokensDataHash } =
+ useAssetsMapWithTokenData(assetsArray);
const totalBorrowBalanceUSD =
fusePoolsData?.reduce((a, b) => {
@@ -62,9 +61,10 @@ const Fuse = () => {
return a + b.totalSupplyBalanceUSD;
}, 0) ?? 0;
- const hasDeposits = useMemo(() => totalSupplyBalanceUSD > 0, [
- totalSupplyBalanceUSD,
- ]);
+ const hasDeposits = useMemo(
+ () => totalSupplyBalanceUSD > 0,
+ [totalSupplyBalanceUSD]
+ );
return (
!p?.poolBalance?.isZero()
);
diff --git a/src/components/pages/Stats/Totals/TranchesRow.tsx b/src/components/pages/Stats/Totals/TranchesRow.tsx
index 395e96ec2..3bb6ac4fe 100644
--- a/src/components/pages/Stats/Totals/TranchesRow.tsx
+++ b/src/components/pages/Stats/Totals/TranchesRow.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Box, Td, Text } from "@chakra-ui/react";
import { motion } from "framer-motion";
import { Column } from "buttered-chakra";
diff --git a/src/components/pages/Tranches/SaffronDepositModal/AmountSelect.tsx b/src/components/pages/Tranches/SaffronDepositModal/AmountSelect.tsx
index 41b753dd0..2d2d837d3 100644
--- a/src/components/pages/Tranches/SaffronDepositModal/AmountSelect.tsx
+++ b/src/components/pages/Tranches/SaffronDepositModal/AmountSelect.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import { useState } from "react";
import { Row, Column } from "buttered-chakra";
import SmallWhiteCircle from "../../../../static/small-white-circle.png";
diff --git a/src/components/pages/Tranches/SaffronDepositModal/index.tsx b/src/components/pages/Tranches/SaffronDepositModal/index.tsx
index 4701affa5..8a4da7220 100644
--- a/src/components/pages/Tranches/SaffronDepositModal/index.tsx
+++ b/src/components/pages/Tranches/SaffronDepositModal/index.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Modal, ModalOverlay, ModalContent } from "@chakra-ui/react";
import AmountSelect, { requiresSFIStaking } from "./AmountSelect";
diff --git a/src/components/pages/Tranches/TranchesPage.tsx b/src/components/pages/Tranches/TranchesPage.tsx
index 6683ce5bb..ca12edf85 100644
--- a/src/components/pages/Tranches/TranchesPage.tsx
+++ b/src/components/pages/Tranches/TranchesPage.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Center, Column, Row, RowOrColumn } from "buttered-chakra";
import { useRari } from "../../../context/RariContext";
import DashboardBox from "../../shared/DashboardBox";
@@ -17,6 +16,7 @@ import DepositModal from "./SaffronDepositModal";
import { SaffronProvider } from "./SaffronContext";
import { SimpleTooltip } from "../../shared/SimpleTooltip";
import { WarningTwoIcon } from "@chakra-ui/icons";
+import React from "react";
// Hooks
import { useIsSmallScreen } from "hooks/useIsSmallScreen";
diff --git a/src/components/shared/CaptionedStat.tsx b/src/components/shared/CaptionedStat.tsx
index c7fea48c3..ea3f69113 100644
--- a/src/components/shared/CaptionedStat.tsx
+++ b/src/components/shared/CaptionedStat.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Heading, Text } from "@chakra-ui/react";
import { CrossAxisAlignment, Column } from "buttered-chakra";
import { useMaybeResponsiveProp } from "../../hooks/useMaybeResponsiveProp";
diff --git a/src/components/shared/ClaimRGTModal.tsx b/src/components/shared/ClaimRGTModal.tsx
index 1901f08e6..4bb785395 100644
--- a/src/components/shared/ClaimRGTModal.tsx
+++ b/src/components/shared/ClaimRGTModal.tsx
@@ -15,7 +15,7 @@ import {
import BigNumber from "bignumber.js";
import { Column, Row } from "buttered-chakra";
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { useQuery } from "react-query";
diff --git a/src/components/shared/CopyrightSpacer.tsx b/src/components/shared/CopyrightSpacer.tsx
index f7db7142d..3a9ade7f7 100644
--- a/src/components/shared/CopyrightSpacer.tsx
+++ b/src/components/shared/CopyrightSpacer.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Text } from "@chakra-ui/react";
const CopyrightSpacer = ({ forceShow = false }: { forceShow?: boolean }) => {
diff --git a/src/components/shared/DashboardBox.tsx b/src/components/shared/DashboardBox.tsx
index 2c2b6335c..97bf09d42 100644
--- a/src/components/shared/DashboardBox.tsx
+++ b/src/components/shared/DashboardBox.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Box, BoxProps } from "@chakra-ui/react";
import { PixelMeasurement } from "buttered-chakra";
diff --git a/src/components/shared/Footer.tsx b/src/components/shared/Footer.tsx
index d6d21a5e8..c65cce61d 100644
--- a/src/components/shared/Footer.tsx
+++ b/src/components/shared/Footer.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import CopyrightSpacer from "./CopyrightSpacer";
import { Link, Text } from "@chakra-ui/react";
import { Row, Column } from "buttered-chakra";
diff --git a/src/components/shared/FullPageSpinner.test.tsx b/src/components/shared/FullPageSpinner.test.tsx
index 38be52efd..d218ae676 100644
--- a/src/components/shared/FullPageSpinner.test.tsx
+++ b/src/components/shared/FullPageSpinner.test.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { ChakraProvider } from "@chakra-ui/react";
import { render, screen } from "@testing-library/react";
diff --git a/src/components/shared/FullPageSpinner.tsx b/src/components/shared/FullPageSpinner.tsx
index 498e28466..96cf331a8 100644
--- a/src/components/shared/FullPageSpinner.tsx
+++ b/src/components/shared/FullPageSpinner.tsx
@@ -1,5 +1,5 @@
/* istanbul ignore file */
-import React, { useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { Spinner, Text } from "@chakra-ui/react";
const FullPageSpinner = () => {
diff --git a/src/components/shared/GlowingButton.tsx b/src/components/shared/GlowingButton.tsx
index df027bbff..1c9ea8376 100644
--- a/src/components/shared/GlowingButton.tsx
+++ b/src/components/shared/GlowingButton.tsx
@@ -1,6 +1,6 @@
import { Box, BoxProps, Button } from "@chakra-ui/react";
-import React, { ReactElement } from "react";
+import { ReactElement } from "react";
export const GlowingButton = ({
label,
diff --git a/src/components/shared/Header.tsx b/src/components/shared/Header.tsx
index 6ad47336f..6836acd07 100644
--- a/src/components/shared/Header.tsx
+++ b/src/components/shared/Header.tsx
@@ -9,7 +9,7 @@ import {
Portal,
} from "@chakra-ui/react";
import { PixelSize, Row } from "buttered-chakra";
-import React from "react";
+
import { AccountButton } from "./AccountButton";
import { DASHBOARD_BOX_PROPS, DASHBOARD_BOX_SPACING } from "./DashboardBox";
import {
@@ -53,21 +53,21 @@ export const Header = ({
width="100%"
>
- {isAuthed ? (
- isPool ? (
-
+ {isAuthed ? (
+ isPool ? (
+
+ ) : isFuse ? (
+
+ ) : (
+
+ )
+ ) : isPool ? (
+
) : isFuse ? (
-
+
) : (
- )
- ) : isPool ? (
-
- ) : isFuse ? (
-
- ) : (
-
- )}
+ )}
{
diff --git a/src/components/shared/Header2/NewHeader.tsx b/src/components/shared/Header2/NewHeader.tsx
index 4c2994bcc..bcdfd143c 100644
--- a/src/components/shared/Header2/NewHeader.tsx
+++ b/src/components/shared/Header2/NewHeader.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import {
Box,
Text,
@@ -24,7 +23,6 @@ import HeaderSearchbar from "./HeaderSearchbar";
import { useIsSmallScreen } from "hooks/useIsSmallScreen";
-
export const HeaderHeightWithTopPadding = new PixelSize(
38 + DASHBOARD_BOX_SPACING.asNumber()
);
@@ -32,8 +30,7 @@ export const HeaderHeightWithTopPadding = new PixelSize(
export const NewHeader = () => {
const { isAuthed } = useRari();
const { t } = useTranslation();
- const isMobile = useIsSmallScreen()
-
+ const isMobile = useIsSmallScreen();
return (
{
)}
- {!isMobile && }
+ {!isMobile && }
@@ -159,5 +156,4 @@ export const SubMenuItem = ({ name, link }: { name: string; link: string }) => {
);
};
-
-export default NewHeader
\ No newline at end of file
+export default NewHeader;
diff --git a/src/components/shared/Layout.tsx b/src/components/shared/Layout.tsx
index 33acba541..7a1a532c2 100644
--- a/src/components/shared/Layout.tsx
+++ b/src/components/shared/Layout.tsx
@@ -1,5 +1,4 @@
//@ts-nocheck
-import React from "react";
import { Column } from "buttered-chakra";
// import Footer from "./Footer";
diff --git a/src/components/shared/Logos.tsx b/src/components/shared/Logos.tsx
index be24f3e0c..61a104e07 100644
--- a/src/components/shared/Logos.tsx
+++ b/src/components/shared/Logos.tsx
@@ -1,5 +1,5 @@
// @ts-ignore
-import React from "react";
+
import { Flip } from "react-awesome-reveal";
import { Box, Image } from "@chakra-ui/react";
diff --git a/src/components/shared/Modal.tsx b/src/components/shared/Modal.tsx
index c468e58ff..35a229d27 100644
--- a/src/components/shared/Modal.tsx
+++ b/src/components/shared/Modal.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { DASHBOARD_BOX_PROPS } from "./DashboardBox";
import { Box, Heading, CloseButton } from "@chakra-ui/react";
import { Row } from "buttered-chakra";
diff --git a/src/components/shared/MovingStat.tsx b/src/components/shared/MovingStat.tsx
index 5ac624a25..3e3649635 100644
--- a/src/components/shared/MovingStat.tsx
+++ b/src/components/shared/MovingStat.tsx
@@ -75,10 +75,10 @@ export const APYMovingStat = React.memo(
const [currentStat, setCurrentStat] = useState(startingAmount);
- const formattedStat = useMemo(() => formatStat(currentStat), [
- formatStat,
- currentStat,
- ]);
+ const formattedStat = useMemo(
+ () => formatStat(currentStat),
+ [formatStat, currentStat]
+ );
useInterval(() => {
setCurrentStat((past) => past + past * increasePerInterval);
@@ -120,10 +120,10 @@ export const APYWithRefreshMovingStat = React.memo(
const [currentStat, setCurrentStat] = useState(0);
- const formattedStat = useMemo(() => formatStat(currentStat), [
- formatStat,
- currentStat,
- ]);
+ const formattedStat = useMemo(
+ () => formatStat(currentStat),
+ [formatStat, currentStat]
+ );
useInterval(() => {
setCurrentStat((past) => past + past * increasePerInterval);
diff --git a/src/components/shared/PoolsPerformance.tsx b/src/components/shared/PoolsPerformance.tsx
index 8cae5279a..6661b3c8e 100644
--- a/src/components/shared/PoolsPerformance.tsx
+++ b/src/components/shared/PoolsPerformance.tsx
@@ -7,7 +7,7 @@ import {
Row,
Center,
} from "buttered-chakra";
-import React, { useMemo } from "react";
+import { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { PoolReturnChartOptions } from "../../utils/chartOptions";
diff --git a/src/components/shared/ProgressBar.tsx b/src/components/shared/ProgressBar.tsx
index 516aea222..8741d4c86 100644
--- a/src/components/shared/ProgressBar.tsx
+++ b/src/components/shared/ProgressBar.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { BoxProps, Box } from "@chakra-ui/react";
interface Props {
diff --git a/src/components/shared/SimpleTooltip.tsx b/src/components/shared/SimpleTooltip.tsx
index b0135ecb9..5a5a5f5e2 100644
--- a/src/components/shared/SimpleTooltip.tsx
+++ b/src/components/shared/SimpleTooltip.tsx
@@ -1,5 +1,5 @@
import { Tooltip } from "@chakra-ui/react";
-import React, { ReactNode } from "react";
+import { ReactNode } from "react";
export const SimpleTooltip = ({
label,
diff --git a/src/components/shared/SliderWithLabel.tsx b/src/components/shared/SliderWithLabel.tsx
index 6a788f142..bedc7693d 100644
--- a/src/components/shared/SliderWithLabel.tsx
+++ b/src/components/shared/SliderWithLabel.tsx
@@ -6,7 +6,6 @@ import {
Text,
} from "@chakra-ui/react";
import { Row } from "buttered-chakra";
-import React from "react";
export const SliderWithLabel = ({
value,
diff --git a/src/components/shared/SwitchCSS.tsx b/src/components/shared/SwitchCSS.tsx
index 6e4f14cc7..be78ae6ab 100644
--- a/src/components/shared/SwitchCSS.tsx
+++ b/src/components/shared/SwitchCSS.tsx
@@ -1,5 +1,3 @@
-import React from "react";
-
export const SwitchCSS = ({
symbol,
color,
diff --git a/src/components/shared/TranslateButton.tsx b/src/components/shared/TranslateButton.tsx
index 12431ea6e..63e01e249 100644
--- a/src/components/shared/TranslateButton.tsx
+++ b/src/components/shared/TranslateButton.tsx
@@ -1,4 +1,3 @@
-import React from "react";
import { Select, SelectProps } from "@chakra-ui/react";
import { useTranslation } from "react-i18next";
diff --git a/src/context/RariContext.tsx b/src/context/RariContext.tsx
index e79f0914e..b887955e2 100644
--- a/src/context/RariContext.tsx
+++ b/src/context/RariContext.tsx
@@ -131,9 +131,8 @@ export interface RariContextData {
export const EmptyAddress = "0x0000000000000000000000000000000000000000";
-export const RariContext = React.createContext(
- undefined
-);
+export const RariContext =
+ React.createContext(undefined);
export const RariProvider = ({ children }: { children: ReactNode }) => {
const { t } = useTranslation();
diff --git a/src/index.tsx b/src/index.tsx
index b404feefb..59d80c913 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,5 +1,5 @@
/* istanbul ignore file */
-import React, { useEffect } from "react";
+import { useEffect } from "react";
import ReactDOM from "react-dom";
import App from "./components/App";