diff --git a/src/components/BorrowInput/index.tsx b/src/components/BorrowInput/index.tsx index d1fe7c9..cd47dd8 100644 --- a/src/components/BorrowInput/index.tsx +++ b/src/components/BorrowInput/index.tsx @@ -137,7 +137,7 @@ export const BorrowInput = (props: { fontSize: 20, boxShadow: "none", borderColor: "transparent", - outline: "transpaernt", + outline: "transparent", }} placeholder="0.00" /> diff --git a/src/components/DepositInput/index.tsx b/src/components/DepositInput/index.tsx index 891306d..4ed4cf2 100644 --- a/src/components/DepositInput/index.tsx +++ b/src/components/DepositInput/index.tsx @@ -89,7 +89,7 @@ export const DepositInput = (props: { fontSize: 20, boxShadow: "none", borderColor: "transparent", - outline: "transpaernt", + outline: "transparent", }} placeholder="0.00" /> diff --git a/src/components/RepayInput/index.tsx b/src/components/RepayInput/index.tsx index f2781ff..0bf3c81 100644 --- a/src/components/RepayInput/index.tsx +++ b/src/components/RepayInput/index.tsx @@ -128,7 +128,7 @@ export const RepayInput = (props: { fontSize: 20, boxShadow: "none", borderColor: "transparent", - outline: "transpaernt", + outline: "transparent", }} placeholder="0.00" /> diff --git a/src/components/ReserveUtilizationChart/index.tsx b/src/components/ReserveUtilizationChart/index.tsx index 129653e..4c676ea 100644 --- a/src/components/ReserveUtilizationChart/index.tsx +++ b/src/components/ReserveUtilizationChart/index.tsx @@ -22,7 +22,7 @@ export const ReserveUtilizationChart = (props: { reserve: LendingReserve }) => { }, []); const liquidityMint = useMint(props.reserve.liquidityMint); - const avilableLiquidity = fromLamports( + const availableLiquidity = fromLamports( props.reserve.availableLiquidity.toNumber(), liquidityMint ); @@ -49,8 +49,8 @@ export const ReserveUtilizationChart = (props: { reserve: LendingReserve }) => { const data = [ { name: "Available Liquidity", - value: avilableLiquidity, - tokens: avilableLiquidity, + value: availableLiquidity, + tokens: availableLiquidity, }, { name: "Total Borrowed", @@ -108,7 +108,7 @@ export const ReserveUtilizationChart = (props: { reserve: LendingReserve }) => { }, ], }); - }, [totalBorrows, avilableLiquidity]); + }, [totalBorrows, availableLiquidity]); return
; }; diff --git a/src/components/SideReserveOverview/index.tsx b/src/components/SideReserveOverview/index.tsx index 0abc7d4..7a2c280 100644 --- a/src/components/SideReserveOverview/index.tsx +++ b/src/components/SideReserveOverview/index.tsx @@ -34,9 +34,9 @@ export const SideReserveOverview = (props: { const borrowApr = calculateBorrowAPY(reserve); const utilizationRate = calculateUtilizationRatio(reserve); - const liquidiationThreshold = reserve.config.optimalUtilizationRate / 100; - const liquidiationPenalty = reserve.config.liquidationBonus / 100; - const maxLTV = liquidiationThreshold - liquidiationPenalty; + const liquidationThreshold = reserve.config.optimalUtilizationRate / 100; + const liquidationPenalty = reserve.config.liquidationBonus / 100; + const maxLTV = liquidationThreshold - liquidationPenalty; let extraInfo: JSX.Element | null = null; if (mode === SideReserveOverviewMode.Deposit) { @@ -51,17 +51,17 @@ export const SideReserveOverview = (props: {
- Maxiumum LTV: + Maximum LTV:
{formatPct.format(maxLTV)}
- Liquidation threashold: + Liquidation threshold:
- {formatPct.format(liquidiationThreshold)} + {formatPct.format(liquidationThreshold)}
@@ -70,7 +70,7 @@ export const SideReserveOverview = (props: { Liquidation penalty:
- {formatPct.format(liquidiationPenalty)} + {formatPct.format(liquidationPenalty)}
diff --git a/src/components/WithdrawInput/index.tsx b/src/components/WithdrawInput/index.tsx index d5c37bc..7ceb1b5 100644 --- a/src/components/WithdrawInput/index.tsx +++ b/src/components/WithdrawInput/index.tsx @@ -89,7 +89,7 @@ export const WithdrawInput = (props: { fontSize: 20, boxShadow: "none", borderColor: "transparent", - outline: "transpaernt", + outline: "transparent", }} placeholder="0.00" /> diff --git a/src/models/lending/reserve.ts b/src/models/lending/reserve.ts index 4e4a484..074dee4 100644 --- a/src/models/lending/reserve.ts +++ b/src/models/lending/reserve.ts @@ -171,6 +171,6 @@ export const initReserveInstruction = ( }; export const calculateUtilizationRatio = (reserve: LendingReserve) => { - return reserve.availableLiquidity.toNumber() / - (reserve.availableLiquidity.toNumber() + wadToLamports(reserve.borrowedLiquidityWad).toNumber()); + let borrowedLiquidity = wadToLamports(reserve.borrowedLiquidityWad).toNumber(); + return borrowedLiquidity / (reserve.availableLiquidity.toNumber() + borrowedLiquidity); } \ No newline at end of file