Small updates to pool creation logic (#7264)
This commit is contained in:
parent
665f64c61b
commit
18ef33433c
@ -28,8 +28,9 @@ function Create ({ className, isDisabled, params: { minCreateBond, minNominatorB
|
||||
const [metadata, setMetadata] = useState('');
|
||||
|
||||
const minValue = useMemo(
|
||||
() => minCreateBond && minNominatorBond && bnMax(minCreateBond, minNominatorBond),
|
||||
[minCreateBond, minNominatorBond]
|
||||
() => minCreateBond && minNominatorBond &&
|
||||
bnMax(minCreateBond, minNominatorBond, api.consts.balances.existentialDeposit),
|
||||
[api, minCreateBond, minNominatorBond]
|
||||
);
|
||||
|
||||
const nextPoolId = useMemo(
|
||||
@ -85,9 +86,9 @@ function Create ({ className, isDisabled, params: { minCreateBond, minNominatorB
|
||||
onChange={setAmount}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={t<string>('The metadata to set for this pool')}>
|
||||
<Modal.Columns hint={t<string>('The metadata description to set for this pool')}>
|
||||
<Input
|
||||
label={t<string>('metadata')}
|
||||
label={t<string>('description')}
|
||||
maxLength={32}
|
||||
onChange={setMetadata}
|
||||
/>
|
||||
|
||||
@ -6,7 +6,7 @@ import type { Params } from './types';
|
||||
import React from 'react';
|
||||
|
||||
import { CardSummary, SummaryBox } from '@polkadot/react-components';
|
||||
import { formatNumber } from '@polkadot/util';
|
||||
import { formatNumber, isNumber } from '@polkadot/util';
|
||||
|
||||
import { useTranslation } from '../translate';
|
||||
|
||||
@ -23,7 +23,7 @@ function Summary ({ className, params: { maxDelegators, maxDelegatorsPool, maxPo
|
||||
<SummaryBox className={className}>
|
||||
{maxDelegators && (
|
||||
<CardSummary label={t<string>('pools')}>
|
||||
{poolCount && <>{formatNumber(poolCount)} / </>}{formatNumber(maxPools)}
|
||||
{isNumber(poolCount) && <>{formatNumber(poolCount)} / </>}{formatNumber(maxPools)}
|
||||
</CardSummary>
|
||||
)}
|
||||
<section>
|
||||
|
||||
@ -91,7 +91,7 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement<Pr
|
||||
},
|
||||
{
|
||||
name: 'actions',
|
||||
text: t<string>('Account actions')
|
||||
text: t<string>('Accounts')
|
||||
},
|
||||
hasStashes && isFunction(api.query.staking.activeEra) && {
|
||||
name: 'payout',
|
||||
@ -101,6 +101,10 @@ function StakingApp ({ basePath, className = '' }: Props): React.ReactElement<Pr
|
||||
// name: 'pools',
|
||||
// text: t<string>('Pools')
|
||||
// },
|
||||
// hasStashes && isFunction(api.query.bagsList?.counterForListNodes) && {
|
||||
// name: 'bags',
|
||||
// text: t<string>('Bags')
|
||||
// },
|
||||
{
|
||||
alias: 'returns',
|
||||
name: 'targets',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user