WA-238 Adding actual threshold info in the component
This commit is contained in:
parent
ee0165ad28
commit
fad5132a60
|
@ -22,13 +22,13 @@ type Props = SelectorProps & {
|
||||||
|
|
||||||
const THRESHOLD_PARAM = 'threshold'
|
const THRESHOLD_PARAM = 'threshold'
|
||||||
|
|
||||||
const ThresholdComponent = ({ numOwners }: Props) => () => (
|
const ThresholdComponent = ({ numOwners, safe }: Props) => () => (
|
||||||
<Block margin="md">
|
<Block margin="md">
|
||||||
<Heading tag="h2" margin="lg">
|
<Heading tag="h2" margin="lg">
|
||||||
{'Change safe\'s threshold'}
|
{'Change safe\'s threshold'}
|
||||||
</Heading>
|
</Heading>
|
||||||
<Heading tag="h4" margin="lg">
|
<Heading tag="h4" margin="lg">
|
||||||
{`Actual number of owners: ${numOwners}`}
|
{`Safe's owners: ${numOwners} and Safe's threshold: ${safe.get('confirmations')}`}
|
||||||
</Heading>
|
</Heading>
|
||||||
<Block margin="md">
|
<Block margin="md">
|
||||||
<Field
|
<Field
|
||||||
|
@ -69,12 +69,13 @@ class Threshold extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { numOwners, onReset } = this.props
|
const { numOwners, onReset, safe } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GnoForm
|
<GnoForm
|
||||||
onSubmit={this.onThreshold}
|
onSubmit={this.onThreshold}
|
||||||
render={ThresholdComponent({ numOwners })}
|
render={ThresholdComponent({ numOwners, safe })}
|
||||||
|
padding={15}
|
||||||
initialValues={this.state.initialValues}
|
initialValues={this.state.initialValues}
|
||||||
>
|
>
|
||||||
{(submitting: boolean, submitSucceeded: boolean) => (
|
{(submitting: boolean, submitSucceeded: boolean) => (
|
||||||
|
@ -84,7 +85,7 @@ class Threshold extends React.PureComponent<Props, State> {
|
||||||
variant="raised"
|
variant="raised"
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={submitSucceeded ? onReset : undefined}
|
onClick={submitSucceeded ? onReset : undefined}
|
||||||
type="submit"
|
type={submitSucceeded ? 'button' : 'submit'}
|
||||||
disabled={submitting}
|
disabled={submitting}
|
||||||
>
|
>
|
||||||
{ submitSucceeded ? 'VISIT TXs' : 'FINISH' }
|
{ submitSucceeded ? 'VISIT TXs' : 'FINISH' }
|
||||||
|
|
Loading…
Reference in New Issue