mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-04 23:14:56 +01:00
fac68980e0
There were two propType errors in the signature request and signature request footer components. A boolean was wrongly declared as a function, and that same boolean was later declared with an invalid propType (`PropTypes.boolean` rather than `PropTypes.bool`). Both errors have been fixed.
30 lines
816 B
JavaScript
30 lines
816 B
JavaScript
import React, { PureComponent } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import Button from '../../../ui/button';
|
|
|
|
export default class SignatureRequestFooter extends PureComponent {
|
|
static propTypes = {
|
|
cancelAction: PropTypes.func.isRequired,
|
|
signAction: PropTypes.func.isRequired,
|
|
disabled: PropTypes.bool,
|
|
};
|
|
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
};
|
|
|
|
render() {
|
|
const { cancelAction, signAction, disabled = false } = this.props;
|
|
return (
|
|
<div className="signature-request-footer">
|
|
<Button onClick={cancelAction} type="secondary" large>
|
|
{this.context.t('cancel')}
|
|
</Button>
|
|
<Button onClick={signAction} type="primary" disabled={disabled} large>
|
|
{this.context.t('sign')}
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|
|
}
|