From 1e0af974cd547d59c5f1c7bd561bd7c5d26b1fb7 Mon Sep 17 00:00:00 2001 From: LancelotM Date: Thu, 29 Oct 2020 13:16:16 +0800 Subject: [PATCH] =?UTF-8?q?#Change=20lp=E9=A1=B5=E9=9D=A2=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E6=8C=89=E9=92=AE=E9=BB=98=E8=AE=A4=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/liquidity/sections/SectionPoolsCard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/liquidity/sections/SectionPoolsCard.js b/src/features/liquidity/sections/SectionPoolsCard.js index a67d5d43a..b673a2f78 100644 --- a/src/features/liquidity/sections/SectionPoolsCard.js +++ b/src/features/liquidity/sections/SectionPoolsCard.js @@ -204,7 +204,7 @@ export default function SectionPoolsCard(props) { } useEffect(() => { - setWithdrawAble(!Boolean(pool.fetchWithdrawPending[tokenIndex]) && (!isEmpty(withdrawAmount[poolIndex])&&withdrawAmount[poolIndex]!=0)); + setWithdrawAble(!Boolean(pool.fetchWithdrawPending[tokenIndex])); }, [poolIndex, tokenIndex, pool.fetchWithdrawPending[tokenIndex], withdrawAmount[poolIndex]]); // 提取 @@ -218,6 +218,9 @@ export default function SectionPoolsCard(props) { }) } let amount = new BigNumber(withdrawAmount[poolIndex]).multipliedBy(new BigNumber(10).exponentiatedBy(getTockenDecimals(pool.earnedToken))).toString(10) + if(amount == 'NaN'){ + amount = '0' + } fetchWithdraw(amount, poolIndex, tokenIndex, isAll) }