Skip to content

Commit

Permalink
#Change Vaults页面存入按钮默认可用
Browse files Browse the repository at this point in the history
  • Loading branch information
LancelotM committed Oct 29, 2020
1 parent 1ef157e commit 0af405f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/features/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { byDecimals } from './bignumber';
let trimReg = /(^\s*)|(\s*$)/g;

export function isEmpty(key){
if (key === undefined || key === '' || key === null){
if (key === undefined || key === '' || key === null || Number.isNaN(key)){
return true;
}
if (typeof(key) === 'string') {
Expand Down
5 changes: 4 additions & 1 deletion src/features/vault/sections/SectionPools.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ export default function SectionPools() {
})
}
let amountValue = depositedBalance[index]? depositedBalance[index].replace(',',''): depositedBalance[index];
if(amountValue == undefined){
amountValue = '0';
}
if (!pool.tokenAddress) {// 如果是eth
fetchDepositEth({
address,
Expand Down Expand Up @@ -440,7 +443,7 @@ export default function SectionPools() {
round
onFocus={(event) => event.stopPropagation()}
disabled={
!Boolean(depositedBalance[index]) || !Boolean(depositedBalance[index]!=0) || fetchDepositPending[index] || (new BigNumber(depositedBalance[index]).toNumber() > balanceSingle.toNumber() || isMoreDepostLimit(new BigNumber(depositedBalance[index]).toNumber(),pool.depostLimit) )
fetchDepositPending[index] || (new BigNumber(depositedBalance[index]).toNumber() > balanceSingle.toNumber() || isMoreDepostLimit(new BigNumber(depositedBalance[index]).toNumber(),pool.depostLimit) )
}
onClick={onDeposit.bind(this, pool, index, false, balanceSingle)}
>{t('Vault-DepositButton')}
Expand Down

0 comments on commit 0af405f

Please sign in to comment.