Skip to content

Fix transaction status incorrectly set to dropped, submitted, or failed#3676

Merged
matthewwalsh0 merged 8 commits intomainfrom
fix/duplicate-nonce-detection-and-polling-after-network-change
Dec 19, 2023
Merged

Fix transaction status incorrectly set to dropped, submitted, or failed#3676
matthewwalsh0 merged 8 commits intomainfrom
fix/duplicate-nonce-detection-and-polling-after-network-change

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Dec 18, 2023

Explanation

Multiple fixes following the full release of the core TransactionController in the extension:

  • When checking if pending transactions have been dropped in the PendingTransactionTracker, look at wallet transactions only from the current chain.
  • Check if the block tracker polling should be started or stopped when the network changes, in addition to when the transaction controller state changes.
  • Fix R, S, and V update to ensure zero values are recorded.
  • Ignore transaction receipts with a null or invalid status.

Changelog

@metamask/transaction-controller

  • FIXED: Fix dropped status detection by ignoring transactions on other chains.
  • FIXED: Start polling if network changes and associated transactions are pending.
  • FIXED: Record r, s, and v values even if zero.
  • FIXED: Only fail transactions if receipt status is explicitly 0x0.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner December 18, 2023 13:14
@matthewwalsh0 matthewwalsh0 added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Dec 18, 2023
vinistevam
vinistevam previously approved these changes Dec 18, 2023
vinistevam
vinistevam previously approved these changes Dec 18, 2023
@matthewwalsh0 matthewwalsh0 changed the title Fix duplicate nonce detection and polling after network change Fix transaction status incorrectly set to dropped, submitted, or failed Dec 18, 2023
dbrans
dbrans previously approved these changes Dec 18, 2023
@matthewwalsh0 matthewwalsh0 dismissed stale reviews from dbrans and vinistevam via 18c0924 December 18, 2023 17:50
@matthewwalsh0 matthewwalsh0 merged commit 8965454 into main Dec 19, 2023
@matthewwalsh0 matthewwalsh0 deleted the fix/duplicate-nonce-detection-and-polling-after-network-change branch December 19, 2023 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-confirmations-system DEPRECATED: please use "team-confirmations" label instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants