Skip to content

Conversation

@danjm
Copy link
Contributor

@danjm danjm commented Jun 30, 2022

Fixes #15080

Fixes this by just hiding the network icon while balance is loading during the network switch

@danjm danjm requested a review from a team as a code owner June 30, 2022 21:53
@danjm danjm requested a review from ryanml June 30, 2022 21:53
@github-actions
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
Copy link
Collaborator

Builds ready [f99578c]
Page Load Metrics (1716 ± 39 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint88158114199
domContentLoaded1572192617078441
load1572192617168039
domInteractive1572192617078541

Copy link
Contributor

@ryanml ryanml left a comment

Choose a reason for hiding this comment

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

Works well!

tokenSymbol={primaryCurrencyProperties.suffix}
secondary={showFiat ? secondaryCurrencyDisplay : undefined}
tokenImage={primaryTokenImage}
tokenImage={balanceIsLoading ? null : primaryTokenImage}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

Should we go a little further and hide the asset?

      {balanceIsLoading ? null : (
        <AssetListItem
          onClick={() => onClickAsset(nativeCurrency)}
          data-testid="wallet-balance"
          primary={
            primaryCurrencyProperties.value ?? secondaryCurrencyProperties.value
          }
          tokenSymbol={primaryCurrencyProperties.suffix}
          secondary={showFiat ? secondaryCurrencyDisplay : undefined}
          tokenImage={primaryTokenImage}
          identiconBorder
        />
      )}

@danjm danjm merged commit f4b25d7 into develop Jul 1, 2022
@danjm danjm deleted the fix-icon-balance-loading-display branch July 1, 2022 13:08
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect asset icon and balance when switching network

5 participants