Skip to content

Conversation

infiniteflower
Copy link
Contributor

@infiniteflower infiniteflower commented Feb 27, 2025

Explanation

This PR changes the state shape of BridgeController and BridgeStatusController to better match the standard shape with all the relevant fields at the root of state rather than behind a redundant field like state.bridgeState or state.bridgeStatusState.

It also changes the default values from undefined to null to better support Mobile efforts.

References

Changelog

@metamask/bridge-controller

  • BREAKING: Data fields have been moved to the root of the state object, rather than behind a redundant field state.bridgeState
  • BREAKING: Default values have been changed from undefined to null.

@metamask/bridge-status-controller

  • BREAKING: Data fields have been moved to the root of the state object, rather than behind a redundant field state.bridgeStatusState
  • BREAKING: Redundant type BridgeStatusState removed from exports

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
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@infiniteflower infiniteflower changed the title chore: change bridge state structure to have all fields at root of st… chore: change bridge state structure to have all fields at root of state Feb 27, 2025
@infiniteflower infiniteflower marked this pull request as ready for review February 27, 2025 19:51
@infiniteflower infiniteflower requested a review from a team as a code owner February 27, 2025 19:51
Copy link
Contributor

@amitabh94 amitabh94 left a comment

Choose a reason for hiding this comment

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

LGTM!

@infiniteflower infiniteflower merged commit 5b74b24 into main Feb 27, 2025
137 checks passed
@infiniteflower infiniteflower deleted the feat/bridge-and-bridgeStatus-state-changes branch February 27, 2025 22:19
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.

3 participants