Ensure submission state is reset on onSubmit error

feature/default_network_editable
Erik Marks 4 years ago
parent 53bf9cb766
commit a714da8069
  1. 7
      ui/app/pages/settings/networks-tab/network-form/network-form.component.js

@ -134,6 +134,7 @@ export default class NetworkForm extends PureComponent {
isSubmitting: true,
})
try {
const {
setRpcTarget,
rpcUrl: propsRpcUrl,
@ -180,6 +181,12 @@ export default class NetworkForm extends PureComponent {
if (networksTabIsInAddMode) {
onClear()
}
} catch (error) {
log.error('Unexpected error during form submission.', error)
this.setState({
isSubmitting: false,
})
}
}
onCancel = () => {

Loading…
Cancel
Save