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: set bridge src network, tokens and top assets #26214

Merged
merged 5 commits into from
Oct 4, 2024

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Jul 30, 2024

Description

  • Implements a selectSrcNetwork bridge controller action, which sets a state value for the cross-chain swaps source network
  • On src network change, the controller fetches the bridgeable tokens for the network and also the top assets list
  • Adds a call to the useBridging hook within the bridge route, which sets the src network, tokens and topAssets when the bridge experience is loaded

Open in GitHub Codespaces

Related issues

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

Manual testing steps

N/A, changes only affect state and are not visible

Screenshots/Recordings

New values added to state:

{
  metamask: {
    bridgeState: {
      srcTokens: {
        [tokenAddress.toLowerCase()]: { ...tokenDetails }
      },
      srcTopAssets: [
        // list of tokens sorted by popularity
      ],
    }
  }
}

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 July 30, 2024 01:37
@micaelae micaelae changed the base branch from develop to mb866-set-dest-network July 30, 2024 01:37
@micaelae micaelae marked this pull request as draft July 30, 2024 01:37
Copy link

sonarcloud bot commented Jul 30, 2024

ui/ducks/bridge/actions.ts Outdated Show resolved Hide resolved
ejwessel
ejwessel previously approved these changes Aug 22, 2024
@micaelae micaelae force-pushed the mb866-set-dest-network branch 2 times, most recently from 84b5fb4 to c4af120 Compare September 5, 2024 22:30
@metamaskbot
Copy link
Collaborator

Builds ready [eadcb8c]
Page Load Metrics (1657 ± 59 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14872110165813163
domContentLoaded14801978162410751
load14882052165712359
domInteractive256839147
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.75 KiB (0.07%)
  • ui: 531 Bytes (0.01%)
  • common: 325 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [a08cbaa]
Page Load Metrics (2003 ± 134 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint171128272003277133
domContentLoaded170228001980275132
load171428202003278134
domInteractive15181553918
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.75 KiB (0.07%)
  • ui: 531 Bytes (0.01%)
  • common: 325 Bytes (0.00%)

@micaelae micaelae force-pushed the mb866-set-dest-network branch 2 times, most recently from d24e8b1 to e982f17 Compare October 4, 2024 16:24
Base automatically changed from mb866-set-dest-network to develop October 4, 2024 17:08
@micaelae micaelae dismissed ejwessel’s stale review October 4, 2024 17:08

The base branch was changed.

Copy link

sonarcloud bot commented Oct 4, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [0adea10]
Page Load Metrics (1763 ± 81 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint45322981706331159
domContentLoaded15002247173516177
load15372295176316981
domInteractive16169533818
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 511 Bytes (0.01%)
  • ui: 457 Bytes (0.01%)
  • common: 69 Bytes (0.00%)

@micaelae micaelae added this pull request to the merge queue Oct 4, 2024
Merged via the queue into develop with commit ec698f8 Oct 4, 2024
77 checks passed
@micaelae micaelae deleted the mb866-set-src-network branch October 4, 2024 20:51
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 4, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants