Maciej Hirsz cf59688896 Enable Parity Signer Message Signing (#1663)
* Enable Parity Signer to sign messages

* Verify that message signature is correct

* Type systems are awesome :)
2018-04-25 19:36:29 -05:00

25 lines
621 B
TypeScript

import React from 'react';
import translate from 'translations';
import { TSignMessageRequested } from 'actions/message';
interface Props {
message: string;
signMessageRequested: TSignMessageRequested;
}
export default class SignMessageButton extends React.Component<Props, {}> {
public render() {
return (
<button className="SignMessage-sign btn btn-primary btn-lg" onClick={this.handleSignMessage}>
{translate('NAV_SIGNMSG')}
</button>
);
}
private handleSignMessage = () => {
const { signMessageRequested, message } = this.props;
signMessageRequested(message);
};
}