Skip to content

feat: use asset pickers with network dropdown in cross-chain swaps page#27522

Merged
micaelae merged 14 commits intodevelopfrom
mb890-src-and-dest-asset-pickers-backup-0927
Oct 16, 2024
Merged

feat: use asset pickers with network dropdown in cross-chain swaps page#27522
micaelae merged 14 commits intodevelopfrom
mb890-src-and-dest-asset-pickers-backup-0927

Conversation

@micaelae
Copy link
Copy Markdown
Member

@micaelae micaelae commented Oct 1, 2024

Description

Changes include

  • PrepareBridge - cross-chain swaps landing page, accepts user inputs for quote params
  • useTokensWithFiltering - new hook for sorting and filtering tokens
  • useLatestBalance - new hook that returns a user's src chain balance on token selection

Open in GitHub Codespaces

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/METABRIDGE-866

Manual testing steps

  1. Set BRIDGE_USE_DEV_APIS=1 and load extension
  2. Click Bridge button
  3. Verify that PrepareBridgePage appears
  4. Change src/dest chains and tokens; verify that token list is updated as a result
  5. Change input value
  6. Navigate away from Bridge page using Back button
  7. Navigate back to Bridge page and verify that input fields are reset

Screenshots/Recordings

Before

Screenshot 2024-07-12 at 3 44 34 PM

After

Screen.Recording.2024-10-09.at.11.10.17.AM.mov

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.

@micaelae micaelae requested review from a team as code owners October 1, 2024 03:14
@micaelae micaelae marked this pull request as draft October 1, 2024 03:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 1, 2024

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.

@github-actions github-actions bot added the team-bridge-deprecated DEPRECATED: please use "team-swaps-and-bridge" instead label Oct 1, 2024
@micaelae micaelae changed the title Mb890 src and dest asset pickers backup 0927 merge develop into bridge src+dest asset-pickers Oct 1, 2024
@micaelae micaelae force-pushed the mb890-src-and-dest-asset-pickers-backup-0927 branch 4 times, most recently from 4971d09 to 52f9352 Compare October 2, 2024 23:34
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1ee57c2]
Page Load Metrics (1947 ± 104 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint156823121942216104
domContentLoaded154823031915209100
load155123121947216104
domInteractive24196603919
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 3.57 KiB (0.09%)
  • ui: 23.16 KiB (0.32%)
  • common: 663 Bytes (0.01%)

@micaelae micaelae force-pushed the mb890-src-and-dest-asset-pickers-backup-0927 branch from 1ee57c2 to 81fbdf1 Compare October 7, 2024 23:51
@micaelae micaelae changed the base branch from develop to mb890-asset-picker-with-selectable-network October 7, 2024 23:52
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [81fbdf1]
Page Load Metrics (1801 ± 66 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15622224180315373
domContentLoaded15552034177212862
load15632130180113766
domInteractive268246199
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 22.81 KiB (0.30%)
  • common: 113 Bytes (0.00%)

@micaelae micaelae force-pushed the mb890-asset-picker-with-selectable-network branch from b1e0341 to d14b34b Compare October 8, 2024 20:39
@micaelae micaelae changed the title merge develop into bridge src+dest asset-pickers chore: merge develop into bridge src+dest asset-pickers Oct 9, 2024
@micaelae micaelae force-pushed the mb890-asset-picker-with-selectable-network branch from d14b34b to 2309fa5 Compare October 9, 2024 16:18
@micaelae micaelae force-pushed the mb890-src-and-dest-asset-pickers-backup-0927 branch from 81fbdf1 to 9f11057 Compare October 9, 2024 16:18
@micaelae micaelae changed the title chore: merge develop into bridge src+dest asset-pickers feat: use asset pickers with network dropdown in cross-chain swaps page Oct 9, 2024
@micaelae micaelae removed request for a team October 9, 2024 16:34
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [9f11057]
Page Load Metrics (1845 ± 125 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint158325571844255122
domContentLoaded156925491815239115
load157725691845259125
domInteractive178039189
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 22.83 KiB (0.30%)
  • common: 113 Bytes (0.00%)

@micaelae micaelae force-pushed the mb890-src-and-dest-asset-pickers-backup-0927 branch 3 times, most recently from 3222e6d to 6506bef Compare October 9, 2024 18:22
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2024
@jclancy93
Copy link
Copy Markdown
Contributor

Couple of notes here:

I'm guessing that we are looking to add a loading state for the asset picker in a follow on PR? Because I see a slightly delay between changing chain id and the asset list getting update

It looks like there is a pricing issue for Arbitrum specifically
image

Copy link
Copy Markdown
Contributor

@jclancy93 jclancy93 left a comment

Choose a reason for hiding this comment

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

A couple of small things. I didn't review the code too closely as I'm still gaining context here but the manual e2e testing all seemed good to me apart from those two issues I called out

@micaelae micaelae force-pushed the mb890-src-and-dest-asset-pickers-backup-0927 branch from fe7840e to 107470c Compare October 16, 2024 16:07
@micaelae
Copy link
Copy Markdown
Member Author

Couple of notes here:

I'm guessing that we are looking to add a loading state for the asset picker in a follow on PR? Because I see a slightly delay between changing chain id and the asset list getting update

That's right! Loading states will be added as part of https://consensyssoftware.atlassian.net/browse/MMS-1451

It looks like there is a pricing issue for Arbitrum specifically image

Were you testing on Arbitrum prior to this? I'm not seeing the issue locally. Did you see any errors in the foreground/backround?

@micaelae micaelae enabled auto-merge October 16, 2024 16:18
@sonarqubecloud
Copy link
Copy Markdown

@micaelae micaelae added this pull request to the merge queue Oct 16, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [107470c]
Page Load Metrics (1861 ± 93 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16092470186019292
domContentLoaded16012164180314771
load16222495186119593
domInteractive237551199
backgroundConnect14321656531
firstReactRender45286805024
getState5117323115
initialActions01000
loadScripts11591631135912560
setupStore1278342110
uiStartup181128742089233112
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 19.28 KiB (0.25%)
  • common: 66 Bytes (0.00%)

Merged via the queue into develop with commit 6d9cc1f Oct 16, 2024
@micaelae micaelae deleted the mb890-src-and-dest-asset-pickers-backup-0927 branch October 16, 2024 16:50
@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 16, 2024
@gauthierpetetin gauthierpetetin added release-12.6.0 Issue or pull request that will be included in release 12.6.0 and removed release-12.7.0 Issue or pull request that will be included in release 12.7.0 labels Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-bridge-deprecated DEPRECATED: please use "team-swaps-and-bridge" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants