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: prevent repeated incoming transaction notifications #8956

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

matthewwalsh0
Copy link
Member

Description

Update the TransactionController patch to not update the last fetched block number if the new value is lower than the previous one.

This in turn prevents excess incomingTransactionBlock events being emitted which stops the duplicate notifications.

Related issues

Fixes: #8948

Manual testing steps

  1. Use account with previous incoming token transfer.
  2. Send native balance to same account.
  3. Verify incoming transaction notification is shown only once.

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner March 15, 2024 13:10
@matthewwalsh0 matthewwalsh0 added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Mar 15, 2024
Copy link

sonarcloud bot commented Mar 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.67%. Comparing base (2c29c7f) to head (a8b0f17).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8956   +/-   ##
=======================================
  Coverage   43.67%   43.67%           
=======================================
  Files        1271     1271           
  Lines       30921    30921           
  Branches     3092     3092           
=======================================
  Hits        13506    13506           
  Misses      16636    16636           
  Partials      779      779           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sleepytanya
Copy link
Contributor

QA build, Samsung s24+: notification for incoming transaction shown only once.

@sleepytanya sleepytanya added the QA Passed A successful QA run through has been done label Mar 15, 2024
@matthewwalsh0 matthewwalsh0 added the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 15, 2024
Copy link
Contributor

github-actions bot commented Mar 15, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: a8b0f17
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/642d6b1a-fec6-4239-a0fe-f24d269c20e9

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@matthewwalsh0 matthewwalsh0 merged commit 84cb055 into main Mar 15, 2024
41 of 42 checks passed
@matthewwalsh0 matthewwalsh0 deleted the fix/8948-duplicate-incoming-notifications branch March 15, 2024 16:44
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.19.0 Issue or pull request that will be included in release 7.19.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Continuous notifications for incoming transactions.
5 participants