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 0af405f commit 15e8e99
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 @@ -183,7 +183,7 @@ export default function SectionPoolsCard(props) {
};

useEffect(() => {
setDepositAble(!Boolean(pool.fetchDepositPending[tokenIndex]) && (!isEmpty(depositedBalance[poolIndex])&&depositedBalance[poolIndex]!=0));
setDepositAble(!Boolean(pool.fetchDepositPending[tokenIndex]));
}, [poolIndex, tokenIndex, pool.fetchDepositPending[tokenIndex], depositedBalance[poolIndex]]);

// 存入
Expand All @@ -197,6 +197,9 @@ export default function SectionPoolsCard(props) {
})
}
let amount = new BigNumber(depositedBalance[poolIndex]).multipliedBy(new BigNumber(10).exponentiatedBy(getTockenDecimals(selectedTokenInfo.name))).toString(10)
if(amount == 'NaN'){
amount = '0'
}
fetchDeposit(amount, poolIndex, tokenIndex, isAll)
}

Expand Down

0 comments on commit 15e8e99

Please sign in to comment.