Pool fixed (zero max values) (#7521)

This commit is contained in:
Jaco 2022-05-04 13:54:37 +02:00 committed by GitHub
parent 8b8a0b9329
commit b8e9f83b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View File

@ -65,7 +65,7 @@ function Pool ({ className = '', members, ownAccounts, params, poolId }: Props):
</td>
<td className='button'>
<Join
isDisabled={!info.bonded.state.isOpen || !info.bonded.memberCounter.ltn(params.maxMembersPerPool)}
isDisabled={!info.bonded.state.isOpen || (!!params.maxMembersPerPool && !info.bonded.memberCounter.ltn(params.maxMembersPerPool))}
ownAccounts={ownAccounts}
params={params}
poolId={poolId}

View File

@ -21,18 +21,23 @@ function Summary ({ className, params: { maxMembers, maxMembersPerPool, maxPools
return (
<SummaryBox className={className}>
{maxMembers && (
<CardSummary label={t<string>('pools')}>
{isNumber(poolCount) && <>{formatNumber(poolCount)}&nbsp;/&nbsp;</>}{formatNumber(maxPools)}
</CardSummary>
)}
<CardSummary label={t<string>('pools')}>
{isNumber(poolCount) && (
<>
{formatNumber(poolCount)}
{maxPools > 0 && (
<>&nbsp;/&nbsp;{formatNumber(maxPools)}</>
)}
</>
)}
</CardSummary>
<section>
{maxMembers && (
{maxMembers > 0 && (
<CardSummary label={t<string>('max. members')}>
{formatNumber(maxMembers)}
</CardSummary>
)}
{maxMembersPerPool && (
{maxMembersPerPool > 0 && (
<CardSummary label={t<string>('max. members / pool')}>
{formatNumber(maxMembersPerPool)}
</CardSummary>