fix: Update filtering of STX for the Activity list
Description
Update filtering of STX for the Activity list. There was a rare edge case when we showed a duplicated transaction in the Activity list when the transaction status was "unknown" due to reverting on chain. Now backend returns "reverted" for such transactions instead of "unknown", but just in case we have updated client-side code to only show "unknown" non-swaps transactions once in the Activity list.
Related issues
Fixes:
Manual testing steps
- Have at least one smart transaction submitted e.g. on Sepolia
- In the
smartTransactionsListSelectorfunction you can artificially add a new smart transaction with the status "unknown". It should not show up in the Activity list.
const smartTransactions =
state.metamask.smartTransactionsState?.smartTransactions?.[
getCurrentChainId(state)
];
const smartTransactionsCopy = [...smartTransactions];
smartTransactionsCopy.push({
...smartTransactions[0],
status: 'unknown',
type: 'contractInteraction',
statusMetadata: {
...smartTransactions[0].statusMetadata,
minedTx: 'unknown',
},
});
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] 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 format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). 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.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Builds ready [58b57b2]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1161 ± 647 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 70 | 168 | 91 | 23 | 11 |
| domContentLoaded | 9 | 24 | 12 | 4 | 2 | ||
| load | 56 | 3184 | 1161 | 1348 | 647 | ||
| domInteractive | 9 | 24 | 12 | 4 | 2 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 380 Bytes (0.01%)
Codecov Report
Attention: Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.
Project coverage is 65.74%. Comparing base (
c9e944d) to head (6176218). Report is 11 commits behind head on develop.
| Files | Patch % | Lines |
|---|---|---|
| ui/selectors/transactions.js | 72.73% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #24540 +/- ##
===========================================
+ Coverage 65.72% 65.74% +0.01%
===========================================
Files 1360 1360
Lines 54043 54064 +21
Branches 14036 14047 +11
===========================================
+ Hits 35518 35539 +21
Misses 18525 18525
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [6176218]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (204 ± 285 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 67 | 663 | 136 | 129 | 62 |
| domContentLoaded | 9 | 64 | 17 | 12 | 6 | ||
| load | 40 | 2784 | 204 | 593 | 285 | ||
| domInteractive | 9 | 63 | 17 | 12 | 6 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 380 Bytes (0.01%)