Skip to content

fix: handle undefined token address in useBridging hook #29832

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 2 commits into from
Jan 22, 2025

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Jan 21, 2025

Description

Changes

  • gracefully handle tokens for which there is no address field in useBridging
  • fallback to src token in swaps fetchParams when reopening extension and linking to the Bridge page

Open in GitHub Codespaces

Related issues

Fixes: https://metamask.sentry.io/issues/6223741673/?environment=production&project=273505&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D%20firstRelease%3Alatest&referrer=issue-stream&sort=date&statsPeriod=7d&stream_index=12

Manual testing steps

  1. Request a swap quote
  2. Close extension
  3. Reopen extensionm, which should redirect to Swaps page
  4. Click "Swap across networks with Bridge" link
  5. Bridge page should load with native asset as src token

Screenshots/Recordings

Before

Screen.Recording.2025-01-21.at.11.08.48.AM.mov

After

Screen.Recording.2025-01-21.at.11.10.07.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.

@metamaskbot metamaskbot added the team-bridge DEPRECATED: Use team-swaps-and-bridge label Jan 21, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [9c87bd2]
Page Load Metrics (1641 ± 39 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1548186116448039
domContentLoaded1507183616138239
load1549186316418239
domInteractive257241147
backgroundConnect75929168
firstReactRender166326168
getState56014157
initialActions01000
loadScripts1075138611907938
setupStore65414168
uiStartup17052120186210048
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 39 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@micaelae micaelae marked this pull request as ready for review January 21, 2025 20:18
@micaelae micaelae requested a review from a team as a code owner January 21, 2025 20:18
@micaelae micaelae added this pull request to the merge queue Jan 22, 2025
Merged via the queue into main with commit 615c469 Jan 22, 2025
78 checks passed
@micaelae micaelae deleted the sentry-6223741673-undefined-address branch January 22, 2025 16:13
@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-bridge DEPRECATED: Use team-swaps-and-bridge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants