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

chore: cherry-pick xchain swaps UI into v12.10.0 #29259

Closed

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Dec 16, 2024

Description

Cherry-picks these PRs into V-12.10.0

The included PRs have been thoroughly tested by cross-chain swaps QA. However they got blocked last week due to a benchmarking failure.

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.

bfullam and others added 2 commits December 16, 2024 15:00
<!--
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**

When a hardware wallet user declines a transaction during the bridge
process, they are redirected back to the bridge setup page. This PR adds
an info message to clarify why they were redirected and prompt them to
get a new quote.

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to bridge with a hardware wallet
2. Attempt bridge
3. Decline transaction on hardware wallet
4. See info message when you're redirected

## **Screenshots/Recordings**

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

### **Before**

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

### **After**
![Screenshot 2024-12-13 at 14 53
00](https://github.com/user-attachments/assets/abbeca68-39d9-4926-b50f-5321949f58ec)

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

Changes include
- layout and styling updates for the landing screen
- re-styling input fields, including asset pickers
- integrates the multichain asset list into bridge's token list
generator
- style + copy updates in quote display components
- advanced settings modal
- input and quote validation alerts
- bug fixes

This depends on 3 open PRs
1. tracking events:
#28713
2. multichain AssetPicker:
#28975
3. NetworkAvatar style update:
#28976

Changes from #2 and #3 are currently included here, but will mainly just
contain bridge component updates after those are merged. Since those are
being reviewed by external teams, reviews on this one should be focused
on bridge-specific files/directories

Figma:
https://www.figma.com/design/IuOIRmU3wI0IdJIfol0ESu/Cross-Chain-Swaps?node-id=7-24563&node-type=canvas&m=dev

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

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

1. Set these in .metamaskrc and run `yarn webpack --watch`
```
SEGMENT_HOST='http://localhost:9090'
SEGMENT_WRITE_KEY='FAKE'
BRIDGE_USE_DEV_APIS=1
```
2. Try out the Bridge page, asset picker, submitting txs, viewing quotes
etc
3. Open the background console network tab to see emitted events

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

<!-- [screenshots/recordings] -->
![Screenshot 2024-12-11 at 3 02
20 PM](https://github.com/user-attachments/assets/826f7cba-202d-4a52-b15f-ca16c29d7a96)

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

- [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/develop/.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/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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: infiniteflower <[email protected]>
Co-authored-by: Jack Clancy <[email protected]>
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.

@micaelae micaelae changed the base branch from main to Version-v12.10.0 December 16, 2024 23:08
@micaelae micaelae changed the title chore (cherry-pick): xchain swaps UI chore[cherry-pick]: xchain swaps UI Dec 16, 2024
@micaelae micaelae changed the title chore[cherry-pick]: xchain swaps UI chore: cherru-pick xchain swaps UI into v12.10.0 Dec 16, 2024
@micaelae micaelae changed the title chore: cherru-pick xchain swaps UI into v12.10.0 chore: cherry-pick xchain swaps UI into v12.10.0 Dec 16, 2024
@micaelae micaelae marked this pull request as ready for review December 16, 2024 23:45
@micaelae micaelae requested a review from a team as a code owner December 16, 2024 23:45
@metamaskbot
Copy link
Collaborator

Builds ready [322fb6f]
Page Load Metrics (2009 ± 139 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint33626361828553266
domContentLoaded158526221973283136
load159526352009289139
domInteractive26203543919
backgroundConnect9135403216
firstReactRender16121583115
getState593302713
initialActions01000
loadScripts118521221487236113
setupStore687232211
uiStartup176831562430408196
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 363 Bytes (0.01%)
  • ui: 19.03 KiB (0.24%)
  • common: 3.24 KiB (0.04%)

ghgoodreau
ghgoodreau previously approved these changes Dec 17, 2024
jclancy93
jclancy93 previously approved these changes Dec 17, 2024
<!--
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**
Fixes sentry tests for bridge token loading status in Firefox
<!--
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/29285?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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.
@micaelae micaelae dismissed stale reviews from jclancy93 and ghgoodreau via bd0938f December 17, 2024 18:53
@metamaskbot
Copy link
Collaborator

Builds ready [bd0938f]
Page Load Metrics (1834 ± 97 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27319871658461221
domContentLoaded14962432180919594
load15012451183420297
domInteractive2797432110
backgroundConnect86626199
firstReactRender1696352412
getState46119199
initialActions0563126
loadScripts11061920135317785
setupStore66518199
uiStartup17602650210020498
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 363 Bytes (0.01%)
  • ui: 19.03 KiB (0.24%)
  • common: 3.24 KiB (0.04%)

@danjm danjm deleted the branch Version-v12.10.0 December 18, 2024 19:33
@danjm danjm closed this Dec 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants