From b1f23c298f60433ac9198502c81afbeeed12fd4b Mon Sep 17 00:00:00 2001 From: brightiron <95196612+brightiron@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:30:54 -0600 Subject: [PATCH] Spend Approval Improvements, Redirects, Tooltips (#3033) * spend amount check on repayment * redirect lending to /lending/cooler * adjust labels on range chart --- src/App.tsx | 1 + .../Cooler/positions/CreateOrRepayLoan.tsx | 6 ++- src/views/Range/RangeChart.tsx | 37 ++++++++++++------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ece322fc78..a1ff35bee4 100755 --- a/src/App.tsx +++ b/src/App.tsx @@ -247,6 +247,7 @@ function App() { } /> } /> } /> + } /> } /> } /> diff --git a/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx b/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx index 8a59ddc875..14b02f08c5 100644 --- a/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx +++ b/src/views/Lending/Cooler/positions/CreateOrRepayLoan.tsx @@ -197,7 +197,11 @@ export const CreateOrRepayLoan = ({ approve Olympus DAO to use your {loan ? "DAI" : "gOHM"} for borrowing. } - spendAmount={new DecimalBigNumber(collateralAmount.toString(), 18)} + spendAmount={ + loan + ? new DecimalBigNumber(paymentAmount.toString(), 18) + : new DecimalBigNumber(collateralAmount.toString(), 18) + } > { diff --git a/src/views/Range/RangeChart.tsx b/src/views/Range/RangeChart.tsx index 6d68233b39..2b563e677d 100644 --- a/src/views/Range/RangeChart.tsx +++ b/src/views/Range/RangeChart.tsx @@ -1,4 +1,4 @@ -import { Box, CircularProgress } from "@mui/material"; +import { Box, CircularProgress, Typography } from "@mui/material"; import { styled, useTheme } from "@mui/material/styles"; import { DataRow, Paper } from "@olympusdao/component-library"; import { @@ -124,34 +124,43 @@ const RangeChart = (props: { return ( - + + Price + + {label === "now" && ( <> + + Lower Range + + + Upper Range + )}