1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

delete buttonsDisabled boolean

This commit is contained in:
Erik Marks 2020-06-05 16:15:37 -07:00
parent 567b5634ca
commit 0de56203fc

View File

@ -30,7 +30,6 @@ export default class ChooseAccount extends Component {
state = { state = {
selectedAccounts: this.props.selectedAccountAddresses, selectedAccounts: this.props.selectedAccountAddresses,
buttonsDisabled: false,
} }
static defaultProps = { static defaultProps = {
@ -186,7 +185,7 @@ export default class ChooseAccount extends Component {
targetDomainMetadata, targetDomainMetadata,
accounts, accounts,
} = this.props } = this.props
const { selectedAccounts, buttonsDisabled } = this.state const { selectedAccounts } = this.state
const { t } = this.context const { t } = this.context
return ( return (
<div className="permissions-connect-choose-account"> <div className="permissions-connect-choose-account">
@ -205,26 +204,15 @@ export default class ChooseAccount extends Component {
<PermissionsConnectFooter /> <PermissionsConnectFooter />
<div className="permissions-connect-choose-account__bottom-buttons"> <div className="permissions-connect-choose-account__bottom-buttons">
<Button <Button
onClick={() => { onClick={() => cancelPermissionsRequest(permissionsRequestId)}
cancelPermissionsRequest(permissionsRequestId)
this.setState({
buttonsDisabled: true,
})
}}
type="default" type="default"
disabled={buttonsDisabled}
> >
{t('cancel')} {t('cancel')}
</Button> </Button>
<Button <Button
onClick={() => { onClick={() => selectAccounts(selectedAccounts)}
selectAccounts(selectedAccounts)
this.setState({
buttonsDisabled: true,
})
}}
type="primary" type="primary"
disabled={selectedAccounts.size === 0 || buttonsDisabled} disabled={selectedAccounts.size === 0}
> >
{t('next')} {t('next')}
</Button> </Button>