Skip to content

Commit

Permalink
chore: Remove unnecessary event prop (#28546)
Browse files Browse the repository at this point in the history
## **Description**

Removes an unnecessary event prop `smart_transaction_duplicated`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28546?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. This event prop won't be available anymore in some events after
submitting a smart transaction.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
dan437 authored Nov 26, 2024
1 parent d24389c commit 2a06244
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions shared/modules/metametrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ describe('getSmartTransactionMetricsProperties', () => {
cancellationReason: 'not_cancelled',
deadlineRatio: 0.6400288486480713,
minedHash: txHash,
duplicated: true,
timedOut: true,
proxied: true,
minedTx: 'success',
Expand All @@ -112,7 +111,6 @@ describe('getSmartTransactionMetricsProperties', () => {
expect(result).toStrictEqual({
gas_included: true,
is_smart_transaction: true,
smart_transaction_duplicated: true,
smart_transaction_proxied: true,
smart_transaction_timed_out: true,
});
Expand Down
3 changes: 0 additions & 3 deletions shared/modules/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { TransactionMetricsRequest } from '../../app/scripts/lib/transaction/met
type SmartTransactionMetricsProperties = {
is_smart_transaction: boolean;
gas_included: boolean;
smart_transaction_duplicated?: boolean;
smart_transaction_timed_out?: boolean;
smart_transaction_proxied?: boolean;
};
Expand All @@ -31,8 +30,6 @@ export const getSmartTransactionMetricsProperties = (
if (!smartTransactionStatusMetadata) {
return properties;
}
properties.smart_transaction_duplicated =
smartTransactionStatusMetadata.duplicated;
properties.smart_transaction_timed_out =
smartTransactionStatusMetadata.timedOut;
properties.smart_transaction_proxied = smartTransactionStatusMetadata.proxied;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const GET_BATCH_STATUS_RESPONSE_PENDING = {
minedTx: 'not_mined',
wouldRevertMessage: null,
minedHash: '',
duplicated: false,
timedOut: false,
proxied: false,
type: 'sentinel',
Expand All @@ -77,7 +76,6 @@ const GET_BATCH_STATUS_RESPONSE_SUCCESS = {
wouldRevertMessage: null,
minedHash:
'0xec9d6214684d6dc191133ae4a7ec97db3e521fff9cfe5c4f48a84cb6c93a5fa5',
duplicated: true,
timedOut: true,
proxied: false,
type: 'sentinel',
Expand Down

0 comments on commit 2a06244

Please sign in to comment.