From 8da28fc009da142b35ea61710e137bfa65585cd6 Mon Sep 17 00:00:00 2001 From: Jem <91760036+0xJem@users.noreply.github.com> Date: Sat, 21 Sep 2024 17:51:56 +0400 Subject: [PATCH 1/3] Disable consolidate button --- src/views/Lending/Cooler/positions/ConsolidateLoan.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx b/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx index 146174c1c..c25239850 100644 --- a/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx +++ b/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx @@ -59,7 +59,7 @@ export const ConsolidateLoans = ({ console.log("consolidate loans"); return ( <> - setOpen(!open)}>Consolidate Loans + setOpen(!open)}>Consolidate Loans Date: Sat, 21 Sep 2024 18:03:06 +0400 Subject: [PATCH 2/3] Removal modal --- .../Cooler/positions/ConsolidateLoan.tsx | 131 ------------------ 1 file changed, 131 deletions(-) diff --git a/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx b/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx index c25239850..18ddda0a6 100644 --- a/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx +++ b/src/views/Lending/Cooler/positions/ConsolidateLoan.tsx @@ -59,137 +59,6 @@ export const ConsolidateLoans = ({ console.log("consolidate loans"); return ( <> - setOpen(!open)}>Consolidate Loans - - Consolidate Loans - - } - onClose={() => setOpen(false)} - > - <> - - All existing open loans for this Cooler and Clearinghouse will be repaid and consolidated into a new loan - with a {duration} day duration. You must hold enough DAI in your wallet to cover the interest owed at - consolidation. - - - Loans to Consolidate - - {loans.length} - - - - New Principal Amount - - - {formatNumber(parseFloat(formatEther(totals.principal)), 4)} DAI - - - - - Interest Owed At Consolidation - - - {formatNumber(parseFloat(formatEther(totals.interest)), 4)} DAI - - - - - New Maturity Date - - - {maturityDate.toLocaleDateString([], { - month: "long", - day: "numeric", - year: "numeric", - }) || ""}{" "} - {maturityDate.toLocaleTimeString([], { - hour: "2-digit", - minute: "2-digit", - })} - - - - {insufficientCollateral ? ( - - Insufficient DAI Balance - - ) : ( - Approve DAI for Spending on the Consolidation Contract} - spendAmount={new DecimalBigNumber(ethers.constants.MaxUint256, 18)} - approvalText="Approve DAI for Spending" - > - Approve gOHM for Spending on the Consolidation Contract} - spendAmount={new DecimalBigNumber(totals.collateral, 18)} - approvalText="Approve gOHM for Spending" - > - { - coolerMutation.mutate( - { - coolerAddress, - clearingHouseAddress, - loanIds, - }, - { - onSuccess: () => { - setOpen(false); - }, - }, - ); - }} - loading={coolerMutation.isLoading} - disabled={coolerMutation.isLoading} - fullWidth - > - Consolidate Loans - - - - )} - - ); }; From fccec9aeb0bb12240ae060364e10050c36ddf77e Mon Sep 17 00:00:00 2001 From: Jem <91760036+0xJem@users.noreply.github.com> Date: Sat, 21 Sep 2024 18:10:36 +0400 Subject: [PATCH 3/3] Remove link to consolidate --- src/views/Lending/Cooler/positions/Positions.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/views/Lending/Cooler/positions/Positions.tsx b/src/views/Lending/Cooler/positions/Positions.tsx index 50e1f1b8d..236d0646f 100644 --- a/src/views/Lending/Cooler/positions/Positions.tsx +++ b/src/views/Lending/Cooler/positions/Positions.tsx @@ -242,15 +242,6 @@ export const CoolerPositions = () => { > Borrow DAI & Open Position - {clearingHouse && loans.length > 1 && ( - - )} )}