-
Notifications
You must be signed in to change notification settings - Fork 39
feat(frontend): Hide stake balance in Send and Swap modal #10568
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
feat(frontend): Hide stake balance in Send and Swap modal #10568
Conversation
There was a problem hiding this 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
showStakeBalanceoptional prop with default value oftrueto 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.
DenysKarmazynDFINITY
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
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.