mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Ensure submission state is reset on onSubmit error
This commit is contained in:
parent
53bf9cb766
commit
a714da8069
@ -134,6 +134,7 @@ export default class NetworkForm extends PureComponent {
|
|||||||
isSubmitting: true,
|
isSubmitting: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
const {
|
const {
|
||||||
setRpcTarget,
|
setRpcTarget,
|
||||||
rpcUrl: propsRpcUrl,
|
rpcUrl: propsRpcUrl,
|
||||||
@ -180,6 +181,12 @@ export default class NetworkForm extends PureComponent {
|
|||||||
if (networksTabIsInAddMode) {
|
if (networksTabIsInAddMode) {
|
||||||
onClear()
|
onClear()
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
log.error('Unexpected error during form submission.', error)
|
||||||
|
this.setState({
|
||||||
|
isSubmitting: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onCancel = () => {
|
onCancel = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user