-
-
Notifications
You must be signed in to change notification settings - Fork 219
feat: calculate bridge quote metadata in @metamask/bridge-controller #5614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- packages/bridge-controller/package.json: Language not supported
- packages/bridge-controller/tsconfig.build.json: Language not supported
- packages/bridge-controller/tsconfig.json: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 12 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- packages/bridge-controller/package.json: Language not supported
- packages/bridge-controller/tsconfig.build.json: Language not supported
- packages/bridge-controller/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)
packages/bridge-controller/src/bridge-controller.ts:254
- Merging multiple state objects via the spread operator can lead to key collisions; consider explicitly mapping or namespacing the keys from each controller to ensure state values are not inadvertently overwritten.
const exchangeRateSources = { ...this.messagingSystem.call('MultichainAssetsRatesController:getState'), ...this.messagingSystem.call('CurrencyRateController:getState'), ...this.messagingSystem.call('TokenRatesController:getState'), ...this.state };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments but otherwise looks good !
Would be great to see a pair PR for extension using these selectors even if it is a rough one.
Co-authored-by: cryptodev-2s <[email protected]>
Co-authored-by: cryptodev-2s <[email protected]>
There appear to be some breaking changes in this PR. I noticed this item in the checklist was not checked:
Are there draft PRs that we've created on both extension and mobile, and if not, can we do that? That will help to ensure that we can upgrade to the new version quickly. |
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@mcmire here's the PR for upgrading the package in extension: MetaMask/metamask-extension#31752 the logic for consuming the new functionality I introduced here doesn't exist in mobile yet and they plan to implement it this week |
@micaelae Okay cool, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, thank you :)
## 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? --> Releasing @metamask/bridge-controller 14.0.0 which includes cross-chain swaps quote metadata utilities added in #5614 ## 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 --> ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## 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
## Explanation Extension integration PR: MetaMask/metamask-extension#31907 This adds a `submitTx` method to the bridge-status-controller that submits a Solana tx to the Keyring/snap controller then starts polling for transaction status To use this in mobile/extension - replace the confirmation and status polling calls with `submitTx` - the new method needs to be bound - the controller init needs to be updated with snap permissions (see [extension example](https://github.com/MetaMask/metamask-extension/pull/31907/files#diff-6fbff2cfe97ac01b77296ef2122c7e0a5b3ff6a84b584b4d1a87482f35eea3d6)) - this change depends on type updates included in [bridge-controller](#5614) <!-- 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? --> ## 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 --> ## Changelog <!-- THIS SECTION IS NO LONGER NEEDED. The process for updating changelogs has changed. Please consult the "Updating changelogs" section of the Contributing doc for more. --> ## 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 --------- Co-authored-by: cryptodev-2s <[email protected]> Co-authored-by: infiniteflower <[email protected]>
Explanation
Refer to extension integration PR for usage examples: MetaMask/metamask-extension#31752
Added
Changed
References
Checklist