Adjust pool min join calc (#8689)

This commit is contained in:
Jaco 2023-01-04 18:55:08 +02:00 committed by GitHub
parent 65dcb5e59e
commit f73371c91d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ function Join ({ className, isDisabled, ownAccounts, params: { minMemberBond },
size='large'
>
<Modal.Content>
<Modal.Columns hint={t<string>('The account that is to join the pool.')}>
<Modal.Columns hint={t<string>('The account that will join the pool.')}>
<InputAddress
filter={ownAccounts}
label={t<string>('join pool from')}
@ -58,7 +58,7 @@ function Join ({ className, isDisabled, ownAccounts, params: { minMemberBond },
withExclude
/>
</Modal.Columns>
<Modal.Columns hint={t<string>('The initial value to assign to the pool. It is set to the maximum of the minimum bond and the minium nomination value.')}>
<Modal.Columns hint={t<string>('The initial value to assign to the pool. It is set to the minimum value required to join a pool.')}>
<InputBalance
autoFocus
defaultValue={minMemberBond}

View File

@ -6,7 +6,7 @@ import type { BN } from '@polkadot/util';
import type { Params } from './types';
import { createNamedHook, useApi, useCallMulti } from '@polkadot/react-hooks';
import { BN_ONE, BN_ZERO, bnMax } from '@polkadot/util';
import { BN_ONE, BN_ZERO } from '@polkadot/util';
const OPT_MULTI = {
defaultValue: {
@ -23,7 +23,7 @@ const OPT_MULTI = {
maxPools: maxPools.unwrapOr(BN_ZERO).toNumber(),
minCreateBond,
minJoinBond,
minMemberBond: minJoinBond && minNominatorBond && bnMax(minJoinBond, minNominatorBond),
minMemberBond: minJoinBond,
minNominatorBond,
nextPoolId: lastPoolId.add(BN_ONE)
})