diff --git a/src/components/pages/Fuse/FusePoolPage/BorrowList.tsx b/src/components/pages/Fuse/FusePoolPage/BorrowList.tsx index dd234f17..5f45b82f 100644 --- a/src/components/pages/Fuse/FusePoolPage/BorrowList.tsx +++ b/src/components/pages/Fuse/FusePoolPage/BorrowList.tsx @@ -30,7 +30,7 @@ import { } from "hooks/rewards/usePoolIncentives"; // Utils - import { convertMantissaToAPY } from "utils/apyUtils"; + import { convertMantissaToAPR, convertMantissaToAPY } from "utils/apyUtils"; import { shortUsdFormatter, smallUsdFormatter } from "utils/bigUtils"; import { useCreateComptroller } from "utils/createComptroller"; import { USDPricedFuseAsset } from "utils/fetchFusePoolData"; @@ -253,7 +253,7 @@ export const BorrowList = ({ const tokenData = useTokenData(asset.underlyingToken); - const borrowAPY = convertMantissaToAPY(asset.borrowRatePerBlock, 365); + const borrowAPR = convertMantissaToAPR(asset.borrowRatePerBlock); const { t } = useTranslation(); @@ -335,7 +335,7 @@ export const BorrowList = ({ fontWeight="bold" fontSize="17px" > - {borrowAPY.toFixed(2)}% + {borrowAPR.toFixed(2)}% {/* Demo Borrow Incentives */} diff --git a/src/components/pages/Fuse/Modals/CVXMigrateModal.tsx b/src/components/pages/Fuse/Modals/CVXMigrateModal.tsx index ecf103ff..9c31400e 100644 --- a/src/components/pages/Fuse/Modals/CVXMigrateModal.tsx +++ b/src/components/pages/Fuse/Modals/CVXMigrateModal.tsx @@ -36,8 +36,6 @@ import { checkAllowanceAndApprove, collateralize, deposit, unstakeAndWithdrawCVX import { handleGenericError } from "utils/errorHandling" import { USDPricedFuseAsset } from "utils/fetchFusePoolData" - - export const CVXMigrateModal = ({ isOpen, onClose, @@ -135,6 +133,7 @@ export const CVXMigrateModal = ({ const newTotalSupply = useTotalSupply(updatedUserAssets ?? []) + /* Unstakes and Claims all CVX Staked Positions supported by Fuse */ const handleUnstake = async () => { const { stakedBalance } = marketBalanceForAsset @@ -148,6 +147,7 @@ export const CVXMigrateModal = ({ } } catch (err) { setActiveStep(undefined) + handleGenericError(err, toast) } } @@ -163,6 +163,7 @@ export const CVXMigrateModal = ({ setStep(3) } catch (err) { setActiveStep(undefined) + handleGenericError(err, toast) } } @@ -178,6 +179,7 @@ export const CVXMigrateModal = ({ setStep(4) } catch (err) { setActiveStep(undefined) + handleGenericError(err, toast) } } @@ -192,6 +194,7 @@ export const CVXMigrateModal = ({ setStep(5) } catch (err) { setActiveStep(undefined) + handleGenericError(err, toast) } } @@ -215,6 +218,7 @@ export const CVXMigrateModal = ({ }, [assetIndex]) + return ( <> @@ -227,6 +231,7 @@ export const CVXMigrateModal = ({ Migrate Staked CVX Positions to Fuse + @@ -284,6 +289,7 @@ export const CVXMigrateModal = ({ )} + 3.) @@ -308,6 +314,7 @@ export const CVXMigrateModal = ({ {step === 5 && Done!} + @@ -365,4 +372,5 @@ const Market = ({ + export default CVXMigrateModal \ No newline at end of file