Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Fix sign message to allow to make changes and sign again
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Nov 23, 2017
1 parent 0974464 commit b9a4208
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/signMessage/signMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class SignMessageComponent extends React.Component {
value,
error,
},
result: undefined,
});
}

Expand All @@ -39,7 +40,7 @@ class SignMessageComponent extends React.Component {
this.state.passphrase.value);
const result = Lisk.crypto.printSignedMessage(
message, signedMessage, this.props.account.publicKey);
this.setState({ result, resultIsShown: false });
this.setState({ result });
}

showResult(event) {
Expand All @@ -51,7 +52,6 @@ class SignMessageComponent extends React.Component {
if (copied) {
this.props.successToast({ label: this.props.t('Result copied to clipboard') });
}
this.setState({ resultIsShown: true });
}

render() {
Expand All @@ -73,7 +73,7 @@ class SignMessageComponent extends React.Component {
secondPassphrase={this.state.secondPassphrase}
onChange={this.handleChange.bind(this)} />
</section>
{this.state.resultIsShown ?
{this.state.result ?
<SignVerifyResult result={this.state.result} title={this.props.t('Result')} /> :
<ActionBar
secondaryButton={{
Expand All @@ -84,7 +84,7 @@ class SignMessageComponent extends React.Component {
className: 'sign-button',
type: 'submit',
disabled: (!this.state.message.value ||
this.state.resultIsShown ||
this.state.result ||
!authStateIsValid(this.state)),
}} />
}
Expand Down

0 comments on commit b9a4208

Please sign in to comment.