Skip to content

Conversation

@imblue-dabadee
Copy link
Contributor

@imblue-dabadee imblue-dabadee commented Nov 13, 2025

Explanation

Currently, the Phishing Controller is correctly listening to the Transaction Controller's state changes and scanning the received tokens within a transaction correctly. This feature does not work correctly in the Mobile due to differences in how state changes are emitted. This fix aims to correct for that by also listening for state changes that reveal the same information.

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 communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Make the transaction state change listener also handle transactions[*].simulationData patches to trigger bulk token scans; update tests and changelog.

  • PhishingController:
    • Add #isSimulationDataPatch to detect transactions[*].simulationData patches.
    • Update #onTransactionControllerStateChange to extract tokens when either the whole transaction or its simulationData is patched; skip on remove and scan by chain.
  • Tests (src/PhishingController.test.ts):
    • Restructure "Transaction Controller State Change Integration" suite.
    • Add case for patches on ['transactions', i, 'simulationData'] and maintain existing behaviors (no-op on remove, no tokens, default params, error handling).
  • Changelog:
    • Note fix for Transaction Controller listener picking up mobile state changes.

Written by Cursor Bugbot for commit 0613c52. This will update automatically on new commits. Configure here.

@imblue-dabadee imblue-dabadee requested a review from a team as a code owner November 13, 2025 03:45
@imblue-dabadee imblue-dabadee requested a review from a team as a code owner November 13, 2025 15:09
Copy link
Contributor

@AugmentedMode AugmentedMode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imblue-dabadee imblue-dabadee enabled auto-merge (squash) November 13, 2025 17:50
@imblue-dabadee imblue-dabadee merged commit 572b1f0 into main Nov 14, 2025
272 checks passed
@imblue-dabadee imblue-dabadee deleted the fix/transaction-listener-for-mobile branch November 14, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants