Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update filtering of STX for the Activity list #24540

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dan437
Copy link
Contributor

@dan437 dan437 commented May 15, 2024

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.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Have at least one smart transaction submitted e.g. on Sepolia
  2. In the smartTransactionsListSelector function 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.

@dan437 dan437 requested a review from a team as a code owner May 15, 2024 13:56
Copy link
Contributor

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.

@dan437 dan437 added the team-transactions Transactions team label May 15, 2024
@dan437 dan437 changed the title Update filtering of STX for the Activity list fix: Update filtering of STX for the Activity list May 15, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [58b57b2]
Page Load Metrics (1161 ± 647 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint70168912311
domContentLoaded9241242
load56318411611348647
domInteractive9241242
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 380 Bytes (0.01%)

@forest-diggs-consensys forest-diggs-consensys added release-11.17.0 Issue or pull request that will be included in release 11.17.0 release-11.18.0 Issue or pull request that will be included in release 11.18.0 and removed release-11.18.0 Issue or pull request that will be included in release 11.18.0 labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-11.17.0 Issue or pull request that will be included in release 11.17.0 team-transactions Transactions team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants