diff --git a/src/App.js b/src/App.js index 211913634..add2ac2c8 100644 --- a/src/App.js +++ b/src/App.js @@ -280,6 +280,9 @@ class App extends React.Component { } handleIdentityCancel = () => { + const { identityIntent } = this.state + + identityIntent.reject(new Error('Identity modification cancelled')) this.setState({ identityIntent: null }) } @@ -287,9 +290,8 @@ class App extends React.Component { const { identityIntent } = this.state this.state.wrapper .modifyAddressIdentity(address, { name: label }) - .then(() => - this.setState({ identityIntent: null }, identityIntent.resolve) - ) + .then(identityIntent.resolve) + .then(() => this.setState({ identityIntent: null })) .catch(identityIntent.reject) }