Skip to content

Commit

Permalink
#Change lp页面提取按钮默认可用
Browse files Browse the repository at this point in the history
  • Loading branch information
LancelotM committed Oct 29, 2020
1 parent 5baff37 commit 1e0af97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/features/liquidity/sections/SectionPoolsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]]);

// 提取
Expand All @@ -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)
}

Expand Down

0 comments on commit 1e0af97

Please sign in to comment.