Skip to content

Conversation

@sahar-fehri
Copy link
Contributor

@sahar-fehri sahar-fehri commented Jan 8, 2026

Description

PR to remove balance section in asset details page when non evm token balance is zero.

Changelog

CHANGELOG entry: Removes Non evm balance section in asset details page when zero

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

Screen.Recording.2026-01-08.at.18.51.17.mov

After

Screen.Recording.2026-01-08.at.18.50.33.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.

Note

Hides zero balances for non‑EVM assets on the asset details screen.

  • In AssetOverview.tsx, when isMultichainAsset and no balanceSource, set balance to undefined (was 0), and render Balance only when balance != null
  • Updated snapshots to remove "Your balance" blocks for zero-balance non‑EVM assets and to reflect minor layout tweaks (margins/text alignment around action buttons)

Written by Cursor Bugbot for commit 26f617d. This will update automatically on new commits. Configure here.

@sahar-fehri sahar-fehri requested a review from a team as a code owner January 8, 2026 17:51
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

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.

}
}
>
<Text
Copy link
Contributor Author

Choose a reason for hiding this comment

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

trying to remove all snapshots in this file was time consuming;
another approach i tried was updating the mock to 100 which updates the snapshot to keeo this balance section with balance 100 instead of zero

There were couple issues with these snapshots;
Snapshots captured the loading state (just an ActivityIndicator), so they never tested the fully-rendered component.
When we tried explicit assertions, the component actually rendered fully, which exposed:
Async timing - assertions ran before loading finished
Wrong mock addresses - EVM transactions couldn't match Solana account address
Missing mock data - transactions missing id field
....
Each fix exposed the next issue deeper in the component tree.

Thinking it should be treated as tech debt outside of this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAssets, SmokeWalletPlatform, SmokeNetworkExpansion
  • Risk Level: medium
  • AI Confidence: 80%
click to see 🤖 AI reasoning details

The change modifies how balance is displayed in the AssetOverview component for multichain assets. Specifically, when balanceSource is falsy, the code now returns undefined instead of 0. This causes the "Your balance" section to not render when balance data is unavailable, rather than showing a misleading "0" balance.

The change is:

  1. A single line modification in AssetOverview.tsx (line 535-536)
  2. Affects multichain/non-EVM assets (like Solana) specifically
  3. The snapshot test updates confirm the expected behavior change - the balance section is now hidden when balance is undefined

This is a UI display fix that improves user experience by not showing incorrect "0" balances when the actual balance is unknown or loading. The risk is medium because:

  • It affects a visible UI component (asset details view)
  • It specifically impacts multichain assets which are a newer feature
  • The change is intentional and the unit tests have been updated accordingly

Selected tags:

  • SmokeAssets: Directly tests asset display and management functionality
  • SmokeWalletPlatform: Core wallet functionality including asset views
  • SmokeNetworkExpansion: Tests for non-EVM networks like Solana which are affected by this change

View GitHub Actions results

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 9, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
E Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants