Skip to content

fix: cp-12.16.0 include solana swap features and bug fixes #31408

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

Merged
merged 4 commits into from
Mar 28, 2025

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Mar 28, 2025

Description

Cherry-picks 3 PRs that got merged after the RC

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

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

This PR removes the BridgeController class and shared bridge utils from
the extension repo, and replaces them with
[@metamask/bridge-controller](https://www.npmjs.com/package/@metamask/bridge-controller)
imports

See [Copilot summary for more
details](#31059 (review))

<!--
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/31059?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Bridge and swap functionality for EVM and Solana should be unchanged,
just updating imports

## **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**

- [ ] 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.
<!--
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**

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

This changes adds a `useAssetMetadata` hook that fetches asset details
if it is not found in existing token lists. I've also added more unit
test coverage for the asset-picker token filtering

See [Copilot summary for more
details](#31258 (review))

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

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-2094

## **Manual testing steps**

1. Select solana as active network
2. Go to Bridge page
3. Get the address of a new pump.fun coin
4. Paste address into the asset picker's search bar
5. The token should appear on the list and be selectable
6. After filling out quote params, quotes should be fetched

## **Screenshots/Recordings**

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

### **Before**
No asset is shown
<!-- [screenshots/recordings] -->

### **After**


https://github.com/user-attachments/assets/e1cf7185-49f3-4b64-a31f-1232a19a995d


<!-- [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.
@metamaskbot metamaskbot added the team-swaps-and-bridge For issues with Swaps or Bridging label Mar 28, 2025
Copy link

socket-security bot commented Mar 28, 2025

New and updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] None 0 445 kB metamaskbot
npm/@metamask/[email protected]0.3.0 None 0 111 kB metamaskbot

View full report↗︎

…reopened (#31343)

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

<!--
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/31343?quickstart=1)

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/MMS-2147

## **Manual testing steps**

1. Request a Bridge quote with src=native token
2. Close extension popup
3. Open popup again
4. Balance should be repopulated and token icons should be visible

## **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**

- [ ] 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.
@micaelae micaelae changed the title Cp fix 12.16 swap commits fix: cp-12.16.0 include solana swap features and bug fixes Mar 28, 2025
@micaelae micaelae marked this pull request as ready for review March 28, 2025 17:36
@micaelae micaelae requested review from a team as code owners March 28, 2025 17:36
@micaelae micaelae removed request for a team March 28, 2025 17:36
@MajorLift MajorLift merged commit 342f06b into Version-v12.16.0 Mar 28, 2025
135 of 136 checks passed
@MajorLift MajorLift deleted the cp-fix-12.16-swap-commits branch March 28, 2025 17:59
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [0282a9d]
UI Startup Metrics (1192 ± 62 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1192107614506212421292
load1040929127160947982
domContentLoaded1034910126161949993
domInteractive16133241627
firstPaint728711268416240981
backgroundConnect116518910
firstReactRender19154961932
getState12430769
initialActions004001
loadScripts817703101859855915
setupStore8521379
WebpackHomeuiStartup109487314141041295991
load923666111383967989
domContentLoaded915654110682963988
domInteractive191371101743
firstPaint537631110396932985
backgroundConnect20135391945
firstReactRender16126061630
getState8421389
initialActions001001
loadScripts912644109682960986
setupStore9630389
FirefoxBrowserifyHomeuiStartup13621157198716414061774
load12281043182715612801626
domContentLoaded12281043182715612801625
domInteractive9838208278797
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22164852433
firstReactRender23195062541
getState6422278
initialActions001001
loadScripts12071026179115412601602
setupStore6338457
WebpackHomeuiStartup9628231544166876974
load8447161355148794907
domContentLoaded8437161355148794907
domInteractive114671732015797
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect191385102134
firstReactRender18163121824
getState7436579
initialActions001001
loadScripts8277011331144786896
setupStore95791278

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-swaps-and-bridge For issues with Swaps or Bridging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants