Skip to content

fix: show account balances for selected XChain swap destination address #31684

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 8 commits into from
Apr 9, 2025

Conversation

micaelae
Copy link
Member

@micaelae micaelae commented Apr 7, 2025

Description

Open in GitHub Codespaces

Related issues

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

Manual testing steps

  1. Go to the Bridge page
  2. Select an EVM to Solana quote
  3. Note balances shown in the dest asset picker
  4. Change the dest account address
  5. Verify that the dest balances are updated to match the dest account's holdings
  6. Select a Solana to EVM quote
  7. Note token balances shown in the dest asset picker
  8. Change the dest account address
  9. Verify that the dest balances are updated to match the dest account's holdings

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.

@metamaskbot metamaskbot added the team-swaps-and-bridge For issues with Swaps or Bridging label Apr 7, 2025
@micaelae micaelae marked this pull request as ready for review April 7, 2025 22:10
@micaelae micaelae requested a review from a team as a code owner April 7, 2025 22:10
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers

  • ui/hooks/bridge/useTokensWithFiltering.ts
  • ui/pages/bridge/prepare/prepare-bridge-page.tsx

@micaelae micaelae changed the title fix: dest account balances fix: show account balances for selected XChain swap destination address Apr 7, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [3e45914]
UI Startup Metrics (1232 ± 57 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1232109813825712771333
load10749461194551144997
domContentLoaded10679411189551147994
domInteractive16136561629
firstPaint77679119441722279
backgroundConnect106505910
firstReactRender2215150152137
getState1558011780
initialActions001001
loadScripts81668491954858899
setupStore8428478
WebpackHomeuiStartup21771680258118023052388
load16991299204115717761986
domContentLoaded16931294203415517711967
domInteractive171263101446
firstPaint157643575825893
backgroundConnect3512263343560
firstReactRender190544411175893
getState1543833889
initialActions317247
loadScripts16841280201015317641945
setupStore20626727348
FirefoxBrowserifyHomeuiStartup13471181202514914021704
load12051031187914412641523
domContentLoaded12051031187914412641522
domInteractive9536194258998
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect26176492850
firstReactRender22194032227
getState8467879
initialActions001001
loadScripts11821008181614112421477
setupStore6420267
WebpackHomeuiStartup15411338221916815841966
load13351143199616213751721
domContentLoaded13341143199516213741721
domInteractive10156208238996
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect24185052535
firstReactRender35285253746
getState9436679
initialActions102111
loadScripts13121125197116113531694
setupStore8528489
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 109 Bytes (0%)
  • common: 0 Bytes (0%)

ghgoodreau
ghgoodreau previously approved these changes Apr 7, 2025
@micaelae micaelae requested a review from Copilot April 7, 2025 23:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

ui/hooks/bridge/useTokensWithFiltering.ts:68

  • The previous destructuring of assetsWithBalance was removed. If multichainTokensWithBalance is used later in this hook, please update the call to destructure the returned value from useMultichainBalances.
useMultichainBalances(accountId);

GustavoRSSilva
GustavoRSSilva previously approved these changes Apr 8, 2025
@micaelae micaelae added this pull request to the merge queue Apr 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Apr 8, 2025
@micaelae micaelae dismissed stale reviews from GustavoRSSilva and ghgoodreau via 5f0818d April 8, 2025 15:35
@micaelae micaelae enabled auto-merge April 8, 2025 15:36
@metamaskbot
Copy link
Collaborator

Builds ready [5f0818d]
UI Startup Metrics (1230 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1230111815336412691331
load10719181301651140988
domContentLoaded10659121296641136986
domInteractive17136181631
firstPaint7421301307423233960
backgroundConnect97162910
firstReactRender2215140142138
getState12534779
initialActions001001
loadScripts813667103562852899
setupStore8423479
WebpackHomeuiStartup21741705249616622882386
load16971273214016117731995
domContentLoaded16921268213616017681985
domInteractive161254101448
firstPaint158683515724682
backgroundConnect3312268343451
firstReactRender194533731175791
getState1442212679
initialActions318146
loadScripts16801261209015317571947
setupStore29639857429
FirefoxBrowserifyHomeuiStartup13511184175811614171587
load12101056163811512631455
domContentLoaded12101056163811512631455
domInteractive9638190268897
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect25176082741
firstReactRender21193522226
getState7439479
initialActions001001
loadScripts11871037161511512411434
setupStore842352367
WebpackHomeuiStartup14731315184211315121703
load12681104163410313091500
domContentLoaded12671104163310313091500
domInteractive9541160229299
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23174452530
firstReactRender34295453643
getState9530689
initialActions002111
loadScripts12461083160810412871480
setupStore1052862879

@micaelae micaelae added this pull request to the merge queue Apr 9, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [95c632d]
UI Startup Metrics (1210 ± 59 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1210111514785912421322
load10589331236561134991
domContentLoaded10529221227561167990
domInteractive17136871629
firstPaintNaNNaNNaNNaN216995
backgroundConnect96303910
firstReactRender2015149141935
getState13536879
initialActions006100
loadScripts80367995755834901
setupStore8526378
WebpackHomeuiStartup21171707256119622492357
load16641318207117217442020
domContentLoaded16581315206717117402012
domInteractive171260111451
firstPaint17565152915422978
backgroundConnect3111407403355
firstReactRender156533561056096
getState10434589
initialActions317136
loadScripts16461311206316817321989
setupStore21628932509
FirefoxBrowserifyHomeuiStartup13591179180912114171634
load12201054167812412841495
domContentLoaded12201054167712312841494
domInteractive10038213328997
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2516104112343
firstReactRender22182822226
getState7438479
initialActions001001
loadScripts11961038164812312591461
setupStore6411268
WebpackHomeuiStartup15811408205212616721801
load13621209181511614271573
domContentLoaded13621209181511614261572
domInteractive9641171228996
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect26185372844
firstReactRender35295053745
getState8439589
initialActions001011
loadScripts13391184179511514011551
setupStore1142752779

Merged via the queue into main with commit 34e885b Apr 9, 2025
165 of 166 checks passed
@micaelae micaelae deleted the mms2154-dest-account-balances branch April 9, 2025 12:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
@metamaskbot metamaskbot added the release-12.17.0 Issue or pull request that will be included in release 12.17.0 label Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.17.0 Issue or pull request that will be included in release 12.17.0 team-swaps-and-bridge For issues with Swaps or Bridging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants