Skip to content

Conversation

@AntonioVentilii
Copy link
Collaborator

Motivation

It does not really make sense to show the stake balance included in the network dropdown when we are in the send and swap modals.

@AntonioVentilii AntonioVentilii marked this pull request as ready for review November 27, 2025 12:26
@AntonioVentilii AntonioVentilii requested review from a team as code owners November 27, 2025 12:26
Copilot AI review requested due to automatic review settings November 27, 2025 12:26
Copy link
Contributor

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.

Pull request overview

This PR adds a showStakeBalance prop to control whether stake balances are displayed in network selection dropdowns. The feature defaults to true to maintain existing behavior, but is set to false in Send and Swap modals where displaying stake balances is not relevant.

Key Changes

  • Added showStakeBalance optional prop with default value of true to maintain backward compatibility
  • Disabled stake balance display in Send and Swap modal network filters by passing showStakeBalance={false}
  • Threaded the prop through component hierarchy: ModalNetworksFilter → NetworkSwitcherList → MainnetNetwork

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ModalNetworksFilter.svelte Added showStakeBalance prop with default value true and passed it to NetworkSwitcherList component
SwapModalWizardSteps.svelte Set showStakeBalance={false} when rendering ModalNetworksFilter to hide stake balances in swap flow
SendModal.svelte Set showStakeBalance={false} when rendering ModalNetworksFilter to hide stake balances in send flow
NetworkSwitcherList.svelte Added showStakeBalance prop and passed it to MainnetNetwork component, with minor formatting improvements
MainnetNetwork.svelte Added showStakeBalance prop and conditionally includes stake balance in USD balance calculation; contains a duplicate line bug

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@DenysKarmazynDFINITY DenysKarmazynDFINITY left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@AntonioVentilii AntonioVentilii added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit c0c5078 Nov 27, 2025
79 checks passed
@AntonioVentilii AntonioVentilii deleted the feat-frontend/Hide-stake-balance-in-Send-and-Swap-modal branch November 27, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants