Skip to content

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Sep 24, 2025

Explanation

This change replaces getSelectedMultichainAccount calls with getAccountByAddress(walletAddress), which mitigates tx submission issues that happen when the selected account is different from the account for which the quotes were fetched

Note that there are breaking changes (see changelogs) in the submitTx and updateBridgeQuoteParams handlers.

Extension integration PR: MetaMask/metamask-extension#36321

References

Fixes https://consensyssoftware.atlassian.net/browse/MUL-983

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

@micaelae micaelae requested review from a team as code owners September 24, 2025 23:53
@micaelae micaelae changed the title fix: require accountAddress as submitTx param fix: read selectedAccount from bridge handler args Sep 25, 2025
cursor[bot]

This comment was marked as outdated.

@micaelae micaelae changed the title fix: read selectedAccount from bridge handler args fix: read selectedAccount from quote request and submitTx args Sep 25, 2025
@micaelae micaelae enabled auto-merge (squash) September 25, 2025 19:01
@micaelae micaelae merged commit 501686e into main Sep 25, 2025
239 checks passed
@micaelae micaelae deleted the mul983-get-account-by-address branch September 25, 2025 19:08
@micaelae micaelae mentioned this pull request Sep 25, 2025
4 tasks
micaelae added a commit that referenced this pull request Sep 25, 2025
## Explanation

Bumps bridge-controller and bridge-status-controller versions to publish
this change: #6719

<!--
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
-->

## 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
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Sep 26, 2025
<!--
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**

Changes
- Bump bridge controllers to 47.0.0
(MetaMask/core#6719) to remove dependency on the
selectedAccountId when fetching quotes and submitting a transaction
- Add controller permissions for getAccountByAddress action 
- Add selected account address to submitTx call params
- Updates solana activity selectors so all tx submitted by accountGroup
are visible

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/36321?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: fix: include accountAddress in swap tx submission
params and show bridge activity list items for all accounts in
accountGroup

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-983

## **Manual testing steps**

1. Submit solana swap tx
2. Submit solana bridge tx
1. Submit evm swap tx
2. Submit evm bridge tx
3. balances shown in Swap page should be accurate
4. CTA button should be disabled when account has insufficient balance
5. submission should succeed if user has enough funds
6. transactions should be sent from expected accounts
7. all transactions should be visible in activity log (both EVM and
Solana)

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

Nothing happens after attempting to submit a solana transaction. Old
solana bridge txs don't appear in activity list

<!-- [screenshots/recordings] -->

### **After**

Able to submit a solana tx, and can see old and new solana bridge
transactions

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Sep 26, 2025
<!--
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**

Changes
- Bump bridge controllers to 47.0.0
(MetaMask/core#6719) to remove dependency on the
selectedAccountId when fetching quotes and submitting a transaction
- Add controller permissions for getAccountByAddress action 
- Add selected account address to submitTx call params
- Updates solana activity selectors so all tx submitted by accountGroup
are visible

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/36321?quickstart=1)

## **Changelog**

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: fix: include accountAddress in swap tx submission
params and show bridge activity list items for all accounts in
accountGroup

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MUL-983

## **Manual testing steps**

1. Submit solana swap tx
2. Submit solana bridge tx
1. Submit evm swap tx
2. Submit evm bridge tx
3. balances shown in Swap page should be accurate
4. CTA button should be disabled when account has insufficient balance
5. submission should succeed if user has enough funds
6. transactions should be sent from expected accounts
7. all transactions should be visible in activity log (both EVM and
Solana)

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

Nothing happens after attempting to submit a solana transaction. Old
solana bridge txs don't appear in activity list

<!-- [screenshots/recordings] -->

### **After**

Able to submit a solana tx, and can see old and new solana bridge
transactions

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.
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.

2 participants