Skip to content

fix(snaps): Update balance display in AssetSelector #31428

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 1 commit into from
Apr 2, 2025

Conversation

GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Mar 31, 2025

Description

This updates the balance the balance display decimal point to 5 in the AssetSelector of Snaps UI to unify with all the other balance display across the client.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

<Field label="Asset">
      <AssetSelector
        name="asset1"
        addresses={[
          'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1:yourSolanaAddress',
        ]}
      />
</Field>
<Box direction="horizontal">
      <Field label="Asset">
        <AssetSelector
          name="asset"
          addresses={[
            'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:yourSolanaAddress',
          ]}
        />
      </Field>
      <Field label="Send amount">
        <Input name="amount" type="number" placeholder="Enter amount to send" />
      </Field>
</Box>

Screenshots/Recordings

Before

image
image

After

image
image

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.

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner March 31, 2025 09:59
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.

@metamaskbot metamaskbot added the team-snaps-platform Snaps Platform team label Mar 31, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🫰 @MetaMask/snaps-devs

  • ui/components/app/snaps/snap-ui-asset-selector/useSnapAssetDisplay.tsx

@metamaskbot
Copy link
Collaborator

Builds ready [8e71b12]
UI Startup Metrics (1178 ± 53 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1178106613405312141282
load1027927115853935990
domContentLoaded1022922115053936987
domInteractive16134251627
firstPaint7131311155406241959
backgroundConnect10610410910
firstReactRender19143341928
getState9431668
initialActions003001
loadScripts80972292451840910
setupStore7414278
WebpackHomeuiStartup915787118383943957
load77460192068826891
domContentLoaded76957991668821879
domInteractive16125481437
firstPaint396559203258285
backgroundConnect15114471437
firstReactRender13123031321
getState6413279
initialActions001001
loadScripts76656990667820869
setupStore7415279
FirefoxBrowserifyHomeuiStartup14201236199316114591861
load12791084183515513221710
domContentLoaded12791084183415513221710
domInteractive10542275358897
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect24166872434
firstReactRender23193432628
getState7344478
initialActions001001
loadScripts12571066181115412961690
setupStore6413267
WebpackHomeuiStartup9858401545167890963
load8657261395150827971
domContentLoaded8657251395150826970
domInteractive122342362714078
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect19138192332
firstReactRender18162721822
getState94631079
initialActions002001
loadScripts8497131377147838955
setupStore8576879
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.97 KiB (0.03%)
  • ui: 141 Bytes (0%)
  • common: 1 Bytes (0%)

@GuillaumeRx GuillaumeRx enabled auto-merge March 31, 2025 13:40
@GuillaumeRx GuillaumeRx added this pull request to the merge queue Apr 2, 2025
Merged via the queue into main with commit 1ca4b62 Apr 2, 2025
152 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/tweak-balance-format-asset-selector branch April 2, 2025 15:58
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2025
@metamaskbot metamaskbot added the release-12.17.0 Issue or pull request that will be included in release 12.17.0 label Apr 2, 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-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants