- This Faucet will help you fund your accounts outside of Solana main network.
+ This Faucet will help you fund your accounts outside of Solana main
+ network.
- Give me SOL
+
+ Give me SOL
+
);
-}
\ No newline at end of file
+};
diff --git a/src/views/home/index.tsx b/src/views/home/index.tsx
index 415035d..9fd4712 100644
--- a/src/views/home/index.tsx
+++ b/src/views/home/index.tsx
@@ -1,21 +1,25 @@
import React from "react";
-import { useLendingReserves } from '../../hooks';
+import { useLendingReserves } from "../../hooks";
import { LendingReserveItem } from "./item";
-import './itemStyle.less';
+import "./itemStyle.less";
export const HomeView = () => {
const { reserveAccounts } = useLendingReserves();
// TODO: add total Liquidity amount ...
- return
-
-
Asset
-
Market Size
-
Total Borrowed
-
Deposit APY
-
Borrow APY
+ return (
+
+
+
Asset
+
Market Size
+
Total Borrowed
+
Deposit APY
+
Borrow APY
+
+ {reserveAccounts.map((account) => (
+
+ ))}
- {reserveAccounts.map(account => )}
-
;
-}
\ No newline at end of file
+ );
+};
diff --git a/src/views/home/item.tsx b/src/views/home/item.tsx
index f8d3954..1f319e7 100644
--- a/src/views/home/item.tsx
+++ b/src/views/home/item.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import { useTokenName } from '../../hooks';
+import { useTokenName } from "../../hooks";
import { LendingReserve } from "../../models/lending";
import { TokenIcon } from "../../components/TokenIcon";
import { formatNumber, fromLamports } from "../../utils/utils";
@@ -8,26 +8,40 @@ import { Link } from "react-router-dom";
import { PublicKey } from "@solana/web3.js";
import { useMint } from "../../contexts/accounts";
-export const LendingReserveItem = (props: { reserve: LendingReserve, address: PublicKey }) => {
+export const LendingReserveItem = (props: {
+ reserve: LendingReserve;
+ address: PublicKey;
+}) => {
const name = useTokenName(props.reserve.liquidityMint);
const liquidityMint = useMint(props.reserve.liquidityMint);
- const totalLiquidity = fromLamports(props.reserve.totalLiquidity.toNumber(), liquidityMint);
+ const totalLiquidity = fromLamports(
+ props.reserve.totalLiquidity.toNumber(),
+ liquidityMint
+ );
const totalBorrows = props.reserve.totalBorrows.toString();
console.log(liquidityMint);
- return
-
-
- {name}
-
{formatNumber.format(totalLiquidity)} {name}
-
{totalBorrows} {name}
-
--
-
--
-
-
-
- ;
-}
\ No newline at end of file
+ return (
+
+
+
+
+
+ {name}
+
+
+ {formatNumber.format(totalLiquidity)} {name}
+
+
+ {totalBorrows} {name}
+
+
--
+
--
+
+
+
+ );
+};
diff --git a/src/views/index.tsx b/src/views/index.tsx
index fd71cd5..b68beef 100644
--- a/src/views/index.tsx
+++ b/src/views/index.tsx
@@ -1,9 +1,9 @@
-export { HomeView } from './home';
-export { BorrowView } from './borrow';
-export { BorrowReserveView } from './borrowReserve';
-export { DashboardView } from './dashboard';
-export { DepositView } from './deposit';
-export { DepositReserveView } from './depositReserve';
-export { ReserveView } from './reserve';
-export { WithdrawView } from './withdraw';
-export { FaucetView } from './faucet';
+export { HomeView } from "./home";
+export { BorrowView } from "./borrow";
+export { BorrowReserveView } from "./borrowReserve";
+export { DashboardView } from "./dashboard";
+export { DepositView } from "./deposit";
+export { DepositReserveView } from "./depositReserve";
+export { ReserveView } from "./reserve";
+export { WithdrawView } from "./withdraw";
+export { FaucetView } from "./faucet";
diff --git a/src/views/reserve/index.tsx b/src/views/reserve/index.tsx
index d866494..78806fe 100644
--- a/src/views/reserve/index.tsx
+++ b/src/views/reserve/index.tsx
@@ -1,10 +1,10 @@
-import React, { } from "react";
-import { useLendingReserve } from './../../hooks';
+import React from "react";
+import { useLendingReserve } from "./../../hooks";
import { useParams } from "react-router-dom";
-import './style.less';
+import "./style.less";
-import { UserLendingCard } from './../../components/UserLendingCard';
-import { ReserveStatus } from './../../components/ReserveStatus';
+import { UserLendingCard } from "./../../components/UserLendingCard";
+import { ReserveStatus } from "./../../components/ReserveStatus";
export const ReserveView = () => {
const { id } = useParams<{ id: string }>();
@@ -15,16 +15,20 @@ export const ReserveView = () => {
return null;
}
- return
-
-
-
+ return (
+
+
+
+
+
-
;
-}
\ No newline at end of file
+ );
+};
diff --git a/src/views/withdraw/index.tsx b/src/views/withdraw/index.tsx
index 4a02ade..969aa19 100644
--- a/src/views/withdraw/index.tsx
+++ b/src/views/withdraw/index.tsx
@@ -1,11 +1,14 @@
-import React, { } from "react";
-import { useLendingReserve } from '../../hooks';
+import React from "react";
+import { useLendingReserve } from "../../hooks";
import { useParams } from "react-router-dom";
-import './style.less';
+import "./style.less";
-import { WithdrawInput } from '../../components/WithdrawInput';
-import { DepositInfoLine } from '../../components/DepositInfoLine';
-import { SideReserveOverview, SideReserveOverviewMode } from '../../components/SideReserveOverview';
+import { WithdrawInput } from "../../components/WithdrawInput";
+import { DepositInfoLine } from "../../components/DepositInfoLine";
+import {
+ SideReserveOverview,
+ SideReserveOverviewMode,
+} from "../../components/SideReserveOverview";
export const WithdrawView = () => {
const { id } = useParams<{ id: string }>();
@@ -16,21 +19,26 @@ export const WithdrawView = () => {
return null;
}
- return