mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Removed Confirm and Cancel events as they are not triggered anymore (#16777)
This commit is contained in:
parent
f7014a79fc
commit
40cba69128
@ -5,7 +5,6 @@ import { ObjectInspector } from 'react-inspector';
|
|||||||
import LedgerInstructionField from '../ledger-instruction-field';
|
import LedgerInstructionField from '../ledger-instruction-field';
|
||||||
|
|
||||||
import { MESSAGE_TYPE } from '../../../../shared/constants/app';
|
import { MESSAGE_TYPE } from '../../../../shared/constants/app';
|
||||||
import { EVENT } from '../../../../shared/constants/metametrics';
|
|
||||||
import { getURLHostName } from '../../../helpers/utils/util';
|
import { getURLHostName } from '../../../helpers/utils/util';
|
||||||
import { conversionUtil } from '../../../../shared/modules/conversion.utils';
|
import { conversionUtil } from '../../../../shared/modules/conversion.utils';
|
||||||
import { stripHexPrefix } from '../../../../shared/modules/hexstring-utils';
|
import { stripHexPrefix } from '../../../../shared/modules/hexstring-utils';
|
||||||
@ -25,7 +24,6 @@ import SignatureRequestOriginalWarning from './signature-request-original-warnin
|
|||||||
export default class SignatureRequestOriginal extends Component {
|
export default class SignatureRequestOriginal extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
t: PropTypes.func.isRequired,
|
t: PropTypes.func.isRequired,
|
||||||
trackEvent: PropTypes.func.isRequired,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -191,18 +189,8 @@ export default class SignatureRequestOriginal extends Component {
|
|||||||
onSubmit = async (event) => {
|
onSubmit = async (event) => {
|
||||||
const { clearConfirmTransaction, history, mostRecentOverviewPage, sign } =
|
const { clearConfirmTransaction, history, mostRecentOverviewPage, sign } =
|
||||||
this.props;
|
this.props;
|
||||||
const { trackEvent, type } = this.context;
|
|
||||||
|
|
||||||
await sign(event);
|
await sign(event);
|
||||||
trackEvent({
|
|
||||||
category: EVENT.CATEGORIES.TRANSACTIONS,
|
|
||||||
event: 'Confirm',
|
|
||||||
properties: {
|
|
||||||
action: 'Sign Request',
|
|
||||||
legacy_event: true,
|
|
||||||
type,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
clearConfirmTransaction();
|
clearConfirmTransaction();
|
||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
};
|
};
|
||||||
@ -210,18 +198,8 @@ export default class SignatureRequestOriginal extends Component {
|
|||||||
onCancel = async (event) => {
|
onCancel = async (event) => {
|
||||||
const { clearConfirmTransaction, history, mostRecentOverviewPage, cancel } =
|
const { clearConfirmTransaction, history, mostRecentOverviewPage, cancel } =
|
||||||
this.props;
|
this.props;
|
||||||
const { trackEvent, type } = this.context;
|
|
||||||
|
|
||||||
await cancel(event);
|
await cancel(event);
|
||||||
trackEvent({
|
|
||||||
category: EVENT.CATEGORIES.TRANSACTIONS,
|
|
||||||
event: 'Cancel',
|
|
||||||
properties: {
|
|
||||||
action: 'Sign Request',
|
|
||||||
legacy_event: true,
|
|
||||||
type,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
clearConfirmTransaction();
|
clearConfirmTransaction();
|
||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
};
|
};
|
||||||
@ -236,7 +214,7 @@ export default class SignatureRequestOriginal extends Component {
|
|||||||
txData: { type },
|
txData: { type },
|
||||||
hardwareWalletRequiresConnection,
|
hardwareWalletRequiresConnection,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { trackEvent, t } = this.context;
|
const { t } = this.context;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="request-signature__footer">
|
<div className="request-signature__footer">
|
||||||
@ -246,15 +224,6 @@ export default class SignatureRequestOriginal extends Component {
|
|||||||
className="request-signature__footer__cancel-button"
|
className="request-signature__footer__cancel-button"
|
||||||
onClick={async (event) => {
|
onClick={async (event) => {
|
||||||
await cancel(event);
|
await cancel(event);
|
||||||
trackEvent({
|
|
||||||
category: EVENT.CATEGORIES.TRANSACTIONS,
|
|
||||||
event: 'Cancel',
|
|
||||||
properties: {
|
|
||||||
action: 'Sign Request',
|
|
||||||
legacy_event: true,
|
|
||||||
type,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
clearConfirmTransaction();
|
clearConfirmTransaction();
|
||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
}}
|
}}
|
||||||
@ -272,15 +241,6 @@ export default class SignatureRequestOriginal extends Component {
|
|||||||
this.setState({ showSignatureRequestWarning: true });
|
this.setState({ showSignatureRequestWarning: true });
|
||||||
} else {
|
} else {
|
||||||
await sign(event);
|
await sign(event);
|
||||||
trackEvent({
|
|
||||||
category: EVENT.CATEGORIES.TRANSACTIONS,
|
|
||||||
event: 'Confirm',
|
|
||||||
properties: {
|
|
||||||
action: 'Sign Request',
|
|
||||||
legacy_event: true,
|
|
||||||
type,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
clearConfirmTransaction();
|
clearConfirmTransaction();
|
||||||
history.push(mostRecentOverviewPage);
|
history.push(mostRecentOverviewPage);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user