-
Notifications
You must be signed in to change notification settings - Fork 20
fix: Tangle dapp fixes #3070
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
base: develop
Are you sure you want to change the base?
fix: Tangle dapp fixes #3070
Conversation
…ticipant handling and capacity checks - Modified useVaultParticipants to accept sorted vaults and adjusted participant mapping accordingly. - Enhanced VaultsTable to handle cases where depositCap is zero, ensuring accurate capacity percentage calculations.
✅ Deploy Preview for tangle-leaderboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for tangle-dapp failed. Why did it fail? →
|
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Claude finished @devpavan04's task —— View job Code Review Complete ✅Todo List:
SummaryThis PR contains two focused bug fixes that improve vault participant handling and capacity calculations. The changes are well-implemented and address specific edge cases. Code Quality & Best Practices ✅Positive aspects:
Changes AnalysisVaultsHightlightCard.tsxKey improvements:
Code flow improvement: // Before: Used separate useVaultAssets hook
const useVaultParticipants = () => {
const { result: vaultAssets } = useVaultAssets();
// ...
}
// After: Directly uses passed vaults parameter
const useVaultParticipants = (vaults: RestakeVault[] | null) => {
// Eliminates extra API call and improves data consistency
}VaultsTable.tsxEdge case fix:
// Before
const capacityPercentage = tvl === undefined || depositCap === undefined
? null
: calculateBnRatio(tvl, depositCap);
// After
const capacityPercentage = tvl === undefined || depositCap === undefined || depositCap.isZero()
? null
: calculateBnRatio(tvl, depositCap);This prevents division by zero when Potential Issues & Bugs 🔍No significant bugs detected, but here are some observations:
Performance Considerations 🚀Performance improvements:
Security Implications 🔒Secure practices maintained:
Suggestions for Improvement
/**
* Hook to calculate vault participants from sorted vaults data
* @param vaults - Sorted vaults to calculate participants for
*/
const useVaultParticipants = (vaults: RestakeVault[] | null) => {
Overall AssessmentThis is a well-executed bug fix PR that:
The changes are minimal, focused, and improve the robustness of the vault components. Recommended for approval pending any integration testing. |
Summary of changes
@drewstone I'm doing a QA of all the pages in
tangle-dappandtangle-cloud, few more fixes will be addressed here.bridgewith MetamaskQA
CleanShot.2025-11-07.at.07.44.44.mp4
Proposed area of change
apps/tangle-dappapps/tangle-cloudapps/leaderboardlibs/tangle-shared-uilibs/ui-components