Adjust check on first slow for loan (#4962)
This commit is contained in:
parent
173947ccc0
commit
9fed089488
@ -32,7 +32,7 @@ function FundAdd ({ auctionInfo, bestNumber, className, leasePeriod, ownedIds }:
|
||||
const [isOpen, toggleOpen] = useToggle();
|
||||
|
||||
const isEndError = !bestNumber || !endBlock || endBlock.lt(bestNumber);
|
||||
const isFirstError = !firstSlot || (!!leasePeriod && firstSlot.lte(leasePeriod.currentPeriod));
|
||||
const isFirstError = !firstSlot || (!!leasePeriod && firstSlot.lt(leasePeriod.currentPeriod));
|
||||
const isLastError = !lastSlot || !firstSlot || lastSlot.lt(firstSlot) || lastSlot.gt(firstSlot.add(BN_THREE));
|
||||
const defaultSlot = (auctionInfo?.leasePeriod || leasePeriod?.currentPeriod.add(BN_ONE) || 1).toString();
|
||||
|
||||
@ -95,7 +95,7 @@ function FundAdd ({ auctionInfo, bestNumber, className, leasePeriod, ownedIds }:
|
||||
<TxButton
|
||||
accountId={accountId}
|
||||
icon='plus'
|
||||
isDisabled={!paraId || !cap?.gt(BN_ZERO) || !firstSlot?.gte(BN_ZERO) || isEndError || isFirstError || isLastError}
|
||||
isDisabled={!paraId || !cap?.gt(BN_ZERO) || isEndError || isFirstError || isLastError}
|
||||
label={t<string>('Add')}
|
||||
onStart={toggleOpen}
|
||||
params={[paraId, cap, firstSlot, lastSlot, endBlock, null]}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user