Skip to content

feat: add Tron accountChanged event support#7304

Merged
EdouardBougon merged 4 commits intomainfrom
add-tron_accound_change_feature
Dec 4, 2025
Merged

feat: add Tron accountChanged event support#7304
EdouardBougon merged 4 commits intomainfrom
add-tron_accound_change_feature

Conversation

@EdouardBougon
Copy link
Copy Markdown
Contributor

@EdouardBougon EdouardBougon commented Dec 3, 2025

Explanation

Add Tron accountChanged event support, following the previous work done for Solana.

References

Previous PR: #5491

Changelog

@metamask/chain-agnostic-permission

  • ADDED: Added TronAccountChangedNotifications property to KnownSessionProperties enum

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Add Tron accountChanged session property and update related tests and changelog.

  • @metamask/chain-agnostic-permission:
    • Session Properties: Add TronAccountChangedNotifications to KnownSessionProperties in packages/chain-agnostic-permission/src/scope/constants.ts.
    • Tests: Update snapshot for KnownSessionProperties in packages/chain-agnostic-permission/src/scope/constants.test.ts.
    • Changelog: Document addition in packages/chain-agnostic-permission/CHANGELOG.md.

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

@EdouardBougon EdouardBougon requested a review from a team as a code owner December 3, 2025 15:26
adonesky1
adonesky1 previously approved these changes Dec 3, 2025
@EdouardBougon EdouardBougon requested a review from a team as a code owner December 3, 2025 15:56
@EdouardBougon EdouardBougon force-pushed the add-tron_accound_change_feature branch 2 times, most recently from 5886632 to 4e9f542 Compare December 3, 2025 16:19
- Bump `@metamask/network-controller` from `^26.0.0` to `^27.0.0` ([#7202](https://github.com/MetaMask/core/pull/7202), [#7258](https://github.com/MetaMask/core/pull/7258))
- Bump `@metamask/controller-utils` from `^11.15.0` to `^11.16.0` ([#7202](https://github.com/MetaMask/core/pull/7202))
- Bump `@metamask/permission-controller` from `^12.1.0` to `^12.1.1` ([#6988](https://github.com/MetaMask/core/pull/6988), [#7202](https://github.com/MetaMask/core/pull/7202))
- Add `TronAccountChangedNotifications` property in `KnownSessionProperties` enum ([#7304](https://github.com/MetaMask/core/pull/7304))
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s Dec 3, 2025

Choose a reason for hiding this comment

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

Nit: Should this be under ### Added instead ?
You can add the section before the current ### Changed section

Suggested change
- Add `TronAccountChangedNotifications` property in `KnownSessionProperties` enum ([#7304](https://github.com/MetaMask/core/pull/7304))

@jiexi
Copy link
Copy Markdown
Member

jiexi commented Dec 3, 2025

LGTM after @cryptodev-2s 's suggestions

@cryptodev-2s
Copy link
Copy Markdown
Contributor

@EdouardBougon you may have forgotten to push the changes

@EdouardBougon
Copy link
Copy Markdown
Contributor Author

EdouardBougon commented Dec 3, 2025

@EdouardBougon you may have forgotten to push the changes

@cryptodev-2s Yes sorry. It's done

@EdouardBougon EdouardBougon force-pushed the add-tron_accound_change_feature branch from 5759a4d to a1bf7bf Compare December 3, 2025 22:34
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@EdouardBougon EdouardBougon added this pull request to the merge queue Dec 4, 2025
Merged via the queue into main with commit e14ecf3 Dec 4, 2025
281 checks passed
@EdouardBougon EdouardBougon deleted the add-tron_accound_change_feature branch December 4, 2025 15:44
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2025
…#7537)

## 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?
-->
Add Bitcoin accountChanged event support, following the previous work
done for Solana and Tron.



## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->
Related to #7304

## 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](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds `Bip122AccountChangedNotifications` to `KnownSessionProperties`
and updates tests and changelog accordingly.
> 
> - **chain-agnostic-permission**:
> - **KnownSessionProperties**: Add `Bip122AccountChangedNotifications`
(`bip122_accountChanged_notifications`) in `src/scope/constants.ts`.
> - **Tests**: Update snapshots and validations to include Bip122 (and
assert Tron) in `constants.test.ts` and `supported.test.ts`
(`isKnownSessionPropertyValue`, `isSupportedSessionProperty`).
>   - **Changelog**: Document new session property under Unreleased.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
850e228. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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