Skip to content
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

feat: solana swap and bridge navigation #29705

Merged
merged 28 commits into from
Jan 22, 2025

Conversation

bfullam
Copy link
Contributor

@bfullam bfullam commented Jan 14, 2025

Description

Enables swap and bridge buttons for non-evm networks and makes both of those buttons navigate to the bridge interface. Also fences the feature behind a code fence at the build level.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Run repo with "yarn start:flask" command
  2. Enable "Add a new Solana account (Beta)" toggle in experimental settings
  3. Add a Solana account through the account dropdown
  4. Go to home page while having Solana account selected
  5. Click swap or bridge
  6. See bridge interface

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.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [dab950d]
Page Load Metrics (1675 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14351933168414067
domContentLoaded14241901165613665
load14341913167514067
domInteractive247438178
backgroundConnect84820147
firstReactRender15104503416
getState56517199
initialActions01000
loadScripts10291412123011153
setupStore575192411
uiStartup163125032022251121
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 723 Bytes (0.01%)
  • ui: 1.91 KiB (0.02%)
  • common: -200 Bytes (-0.00%)

jclancy93
jclancy93 previously approved these changes Jan 17, 2025
builds.yml Show resolved Hide resolved
Copy link
Contributor

@infiniteflower infiniteflower left a comment

Choose a reason for hiding this comment

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

Does the title need to change for Solana Swaps? Because it still says Bridge for me

ui/selectors/selectors.js Outdated Show resolved Hide resolved
@@ -331,7 +337,7 @@ const CoinButtons = ({
///: END:ONLY_INCLUDE_IF

const setCorrectChain = useCallback(async () => {
if (currentChainId !== chainId) {
if (currentChainId !== chainId && multichainChainId !== chainId) {
Copy link
Member

Choose a reason for hiding this comment

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

Similar to Heyse's comment - can this be written with less negations for better readability?

@metamaskbot
Copy link
Collaborator

Builds ready [38eb96e]
Page Load Metrics (1655 ± 59 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14481917166613163
domContentLoaded14421855164011857
load14471913165512359
domInteractive26166543316
backgroundConnect55618178
firstReactRender15186474320
getState45011126
initialActions01000
loadScripts10381439120910450
setupStore672152010
uiStartup164125932008242116
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -16.26 KiB (-0.27%)
  • ui: 1.16 KiB (0.01%)
  • common: -133.38 KiB (-1.51%)

@bfullam bfullam marked this pull request as ready for review January 22, 2025 15:43
@bfullam bfullam requested a review from a team as a code owner January 22, 2025 15:43
@bfullam bfullam enabled auto-merge January 22, 2025 15:43
@metamaskbot
Copy link
Collaborator

Builds ready [2b1dd86]
Page Load Metrics (1644 ± 87 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14302118163918288
domContentLoaded13862108161318589
load14272123164418287
domInteractive246835126
backgroundConnect67724199
firstReactRender1586412813
getState572232211
initialActions01000
loadScripts10001531118114469
setupStore68812189
uiStartup161124711927229110
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -18.12 KiB (-0.30%)
  • ui: 956 Bytes (0.01%)
  • common: -60.2 KiB (-0.69%)

@bfullam bfullam added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit 01c9fbd Jan 22, 2025
72 checks passed
@bfullam bfullam deleted the MMS-1846-solana-swap-and-bridge-navigation branch January 22, 2025 19:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2025
@metamaskbot metamaskbot added the release-12.12.0 Issue or pull request that will be included in release 12.12.0 label Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.12.0 Issue or pull request that will be included in release 12.12.0 team-swaps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants