You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Explanation
<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:
* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->
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
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Process `transactions[*].simulationData` patches to trigger bulk token
scanning; add tests and changelog entry.
>
> - **PhishingController**:
> - Add `#isSimulationDataPatch` and update
`#onTransactionControllerStateChange` to process
`transactions[*].simulationData` patches and group tokens by chain for
`bulkScanTokens`.
> - Continue skipping `remove` ops; retain transaction-level handling.
> - **Tests
(`packages/phishing-controller/src/PhishingController.test.ts`)**:
> - Add integration tests ensuring scans trigger on `simulationData`
patches, skip on `remove`, and handle no token changes/default params
and error paths.
> - **Changelog**:
> - Note fix for Transaction Controller listener picking up mobile state
changes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5c887b8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments