Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): disable open channel button on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
korhaliv committed Mar 16, 2019
1 parent 569202b commit 4cf556a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/components/Channels/ChannelCreateForm.js
Expand Up @@ -88,6 +88,7 @@ class ChannelCreateForm extends React.Component {
currency: PropTypes.string.isRequired,
currencyName: PropTypes.string.isRequired,
intl: intlShape.isRequired,
isOpeningChannel: PropTypes.bool.isRequired,
isQueryingFees: PropTypes.bool,
onchainFees: PropTypes.shape({
fastestFee: PropTypes.number,
Expand Down Expand Up @@ -320,6 +321,7 @@ class ChannelCreateForm extends React.Component {
selectedNodeDisplayName,
showNotification,
updateContactFormSearchQuery,
isOpeningChannel,
...rest
} = this.props
const { step } = this.state
Expand Down Expand Up @@ -354,7 +356,9 @@ class ChannelCreateForm extends React.Component {

<Panel.Footer>
<FormButtons
isNextButtonDisabled={formState.submits > 0 && formState.invalid}
isNextButtonDisabled={
isOpeningChannel || (formState.submits > 0 && formState.invalid)
}
nextButtonText={
<FormattedMessage
{...messages[
Expand Down
1 change: 1 addition & 0 deletions app/containers/Channels/ChannelCreateForm.js
Expand Up @@ -18,6 +18,7 @@ const mapStateToProps = state => ({
currencyName: tickerSelectors.currencyName(state),
isQueryingFees: state.pay.isQueryingFees,
onchainFees: state.pay.onchainFees,
isOpeningChannel: state.channels.openingChannel,
})

const mapDispatchToProps = {
Expand Down

0 comments on commit 4cf556a

Please sign in to comment.