diff --git a/earn/src/components/boost/ImportBoostWidget.tsx b/earn/src/components/boost/ImportBoostWidget.tsx index d06b28f5..23cbb417 100644 --- a/earn/src/components/boost/ImportBoostWidget.tsx +++ b/earn/src/components/boost/ImportBoostWidget.tsx @@ -221,10 +221,10 @@ export default function ImportBoostWidget(props: ImportBoostWidgetProps) { if (!apr0 || !apr1) { return { dailyInterest0: null, dailyInterest1: null }; } - const dailyInterest0 = (apr0 / 365) * (cardInfo.borrower?.liabilities.amount0 || 0); - const dailyInterest1 = (apr1 / 365) * (cardInfo.borrower?.liabilities.amount1 || 0); + const dailyInterest0 = (apr0 / 365) * (cardInfo.amount0() * (boostFactor - 1)); + const dailyInterest1 = (apr1 / 365) * (cardInfo.amount1() * (boostFactor - 1)); return { dailyInterest0, dailyInterest1 }; - }, [apr0, apr1, cardInfo.borrower?.liabilities.amount0, cardInfo.borrower?.liabilities.amount1]); + }, [apr0, apr1, boostFactor, cardInfo]); const nftTokenId = ethers.BigNumber.from(cardInfo?.nftTokenId || 0); const initializationData = useMemo(() => { diff --git a/earn/src/pages/boost/ImportBoostPage.tsx b/earn/src/pages/boost/ImportBoostPage.tsx index c8e8ea16..46efc8d3 100644 --- a/earn/src/pages/boost/ImportBoostPage.tsx +++ b/earn/src/pages/boost/ImportBoostPage.tsx @@ -169,7 +169,7 @@ export default function ImportBoostPage() { ); }, [cardInfo, boostFactor]); - const isLoading = !updatedCardInfo || !tokenId; + const isLoading = !cardInfo || !updatedCardInfo || !tokenId; return (
@@ -180,7 +180,7 @@ export default function ImportBoostPage() {