From 4e975ed2f955c4e6fa3d9173418ad2e1371960c5 Mon Sep 17 00:00:00 2001 From: Juan Pablo Rombola Date: Wed, 20 Sep 2023 09:54:41 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20leverager=20int?= =?UTF-8?q?egration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Leverager/Operation/index.tsx | 14 +- contexts/LeveragerContext.tsx | 171 ++++------------------- 2 files changed, 27 insertions(+), 158 deletions(-) diff --git a/components/Leverager/Operation/index.tsx b/components/Leverager/Operation/index.tsx index ea513277b..528be02e9 100644 --- a/components/Leverager/Operation/index.tsx +++ b/components/Leverager/Operation/index.tsx @@ -3,7 +3,7 @@ import { ModalBox, ModalBoxCell, ModalBoxRow } from 'components/common/modal/Mod import React from 'react'; import { useTranslation } from 'react-i18next'; import ArrowForwardRoundedIcon from '@mui/icons-material/ArrowForwardRounded'; -import { PRICE_IMPACT_THRESHOLD, useLeveragerContext } from 'contexts/LeveragerContext'; +import { useLeveragerContext } from 'contexts/LeveragerContext'; import MultiplierSlider from '../MultiplierSlider'; import LoopAPR from '../LoopAPR'; import HealthFactor from '../HealthFactor'; @@ -11,7 +11,6 @@ import AssetSelector from '../AssetSelector'; import ModalAlert from 'components/common/modal/ModalAlert'; import NetPosition from '../NetPosition'; import formatNumber from 'utils/formatNumber'; -import { toPercentage } from 'utils/utils'; const Operation = () => { const { t } = useTranslation(); @@ -28,12 +27,11 @@ const Operation = () => { setViewSummary, disabledSubmit, isOverLeveraged, - isPriceImpactAboveThreshold, } = useLeveragerContext(); return ( - + @@ -89,14 +87,6 @@ const Operation = () => { {isOverLeveraged && ( )} - {isPriceImpactAboveThreshold && ( - - )} {disabledSubmit ? (