-
Notifications
You must be signed in to change notification settings - Fork 57
feat: display correct symbol #645
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 updates the vault staking data hooks and UI components to display the correct gauge asset symbol when "Deposit & Stake" is active. Key changes include:
- Adding a new field (stakedGaugeSymbol) to the TStakingInfo type and updating data extraction in useVaultStakingData.
- Updating the RewardsTab component to display the symbol from the newly fetched stakedGaugeSymbol.
- Modifying the QuickActionsTo component to select the correct symbol based on the auto-staking status.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
apps/vaults/hooks/useVaultStakingData.ts | Introduces stakedGaugeSymbol and adjusts data extraction logic for staking data. |
apps/vaults-v3/components/details/actions/QuickActionsTo.tsx | Implements selection of the correct symbol and introduces a debug log. |
apps/vaults-v3/components/details/RewardsTab.tsx | Removes redundant symbol fetching and displays the new stakedGaugeSymbol. |
Co-authored-by: Copilot <[email protected]>
I think this is good to go. pretty simple. |
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.
lg - note on multicalls. we should start using key-value maps instead of bare result arrays. the difference is in not having to document and use indexes on the results, we use readable named keys instead. maintainability+
new commit attempts to fix this. How did 04-mini do? |
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 updates the vault staking data flow to include and display the gauge asset symbol when "Deposit & Stake" is active. Key changes include:
- Adding a new property and decoding logic for stakedGaugeSymbol in the vault staking hook.
- Updating QuickActions and Rewards components to use the new stakedGaugeSymbol.
- Removing a redundant read contract call for symbol in the RewardsTab component.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
apps/vaults/hooks/useVaultStakingData.ts | Added stakedGaugeSymbol support in state and contract calls to decode it. |
apps/vaults-v3/components/details/actions/QuickActionsTo.tsx | Updated quick actions to display stakedGaugeSymbol when auto-staking is enabled. |
apps/vaults-v3/components/details/RewardsTab.tsx | Modified symbol display to use stakedGaugeSymbol from vaultData. |
Comments suppressed due to low confidence (1)
apps/vaults/hooks/useVaultStakingData.ts:83
- Consider verifying the fallback logic at line 83; using 'foundVaultWithDisabledStaking || zeroAddress' might be redundant given the ternary condition. Reverting to the previous pattern could improve clarity.
const stakingAddress = foundVaultWithDisabledStaking ? toAddress(foundVaultWithDisabledStaking || zeroAddress) : toAddress(props.currentVault.staking.address);
Co-authored-by: Copilot <[email protected]>
Description
Display gauge asset symbol if "Deposit & Stake" is on
Related Issue
rossgalloway/ySHIP#46