Support transactions from account snaps that should not be published#5045
Conversation
…t should not be published
2f7ffb1 to
e58ce4a
Compare
|
@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. |
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
|
@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. |
|
@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. |
|
@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. |
62f47cf to
b5c69f0
Compare
| - Added flow only will be activated if chainId is defined in feature flags. | ||
| - Configure pending transaction polling intervals using remote feature flags ([#5549](https://github.com/MetaMask/core/pull/5549)) | ||
|
|
||
| ### Changed |
There was a problem hiding this comment.
This is the wrong place now, probably a bad merge.
But I also had comments concerning the formatting below, so maybe quickest to remove this and I can add back when we release?
We'd ideally want separate categories like Removed for the deletions, and we can group things together under a single pull request reference.
| /** | ||
| * Request parameters for updating a custodial transaction. | ||
| * | ||
| * @param transactionId - The ID of the transaction to update. |
There was a problem hiding this comment.
Can we move these to the properties themselves rather than JSDoc?
…re into MMI-5803-deferral-proposal-2
…roller * origin/main: feat: support transactions from account snaps that should not be published (#5045) chore: bump accounts dependencies (#5565) chore: remove `goerli` and `linea goerli` from `network-controller` as default network (#5560) export Caip25Errors from @metamask/chain-agnostic-permission package (#5566)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Upgrades `@metamask/transaction-controller` to v53.0.0 Also removes the MMI hooks, so that we are no longer dependent on the custodyStatus/custodyId properties from transaction controller, given that they were removed in v53.0.0. MMI is deprecated, so this code is gradually being cleared out. [](https://codespaces.new/MetaMask/metamask-extension/pull/31597?quickstart=1) ## **Related issues** Core PR: MetaMask/core#5045 ## **Manual testing steps** `yarn lint` will break otherwise ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net> Co-authored-by: Vinicius Stevam <vinicius.stevam@consensys.net> Co-authored-by: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
…andling (#30180) ## **Description** Explanation Relates to MetaMask/core#5045 References [Institutional Snap RAPID](https://docs.google.com/document/d/16vKfRpbJrdtTMKaCU7wS61ffaEUe8vLZgZbxdLF39MY/edit?tab=t.0#heading=h.r7r3tthf4lsf) >The majority of our custodians are still on ECA-1 (or have APIs with an equivalent functionality). > This presents a limitation because the keyring API does not support a workflow where the keyring does not return a signature for publication. > We propose to repurpose the existing asynchronous transaction workflow that was used for MMI. Accordingly, we would bring a small amount of MMI logic (currently code-fenced) into MetaMask, and decide on publication at an account level. We use the existing beforePublish hook in metamask-controller to read this `custodianPublishesTransaction` option (set at account level by the institutional snap and tell the transaction controller not to publish based on it. As a side effect, this hook also sets the hash of the transaction and marks it as submitted. Additionally, custodians can change some transaction parameters. In order to update the params before they are compared with the signature, the InstitutionalSnapController fetches these parameters from the snap. [](https://codespaces.new/MetaMask/metamask-extension/pull/30180?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** ## **Screenshots/Recordings** https://github.com/user-attachments/assets/b17e6776-6ae8-457a-988a-da9d2716598a ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [X] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Explanation
Relates to this extension PR
References
Institutional Snap RAPID
Changelog
@metamask/transaction-controllerupdateCustodialTransactionnow allows changing more propertiesChecklist