1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-05 15:35:46 +01:00
metamask-extension/ui/components/app/signature-request/signature-request-footer/signature-request-footer.component.js
amerkadicE 505517e8c7
Fix: multiple reject on the signature request screen (#16199)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-11-30 08:13:14 +01:00

39 lines
966 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"
data-testid="signature-cancel-button"
>
{this.context.t('reject')}
</Button>
<Button
onClick={signAction}
type="primary"
data-testid="signature-sign-button"
disabled={disabled}
>
{this.context.t('sign')}
</Button>
</div>
);
}
}