-
Notifications
You must be signed in to change notification settings - Fork 20
refactor(tangle-dapp): Claim migration and liquid staking improvements #3091
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
- Normalize vault asset addresses to lowercase for proper indexer matching - Add TokenIcon to vault selection in deposit/redeem pages - Improve vault display names (use underlying asset symbol) - Simplify redeem page UI with cleaner shares display - Show approximate asset value on pending redeem claims - Fix TransactionInputCard max amount handling for small values - Update local Anvil contract and token addresses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…staking pages - Use getRoundedAmountString for consistent amount formatting in tables - Add proper icons and avatars for selected operator/asset in create vault - Use OperatorListItem and AssetListItem components for better list rendering - Show approximate asset value inline with shares in redeem page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…osit/redeem forms When clicking Deposit/Redeem buttons in Vaults/Positions tables, the vault is now automatically pre-selected in the corresponding form based on the ?vault= query parameter. Also unified the Redeem button style to match the Deposit button. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…k length separately
…ain collisions Token metadata cache and lookups were not chain-aware, causing incorrect metadata to be returned when users switched between networks (e.g., same address could represent different tokens on different chains). Changes: - Restructure KNOWN_TOKEN_ADDRESSES to be keyed by chainId - Update metadataCache key format from "address" to "chainId:address" - Add chainId parameter to getCachedTokenMetadata, cacheTokenMetadata, and resolveTokenMetadata functions - Update all consumers to pass chainId from wagmi/viem 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ing operations Add txName and txDetails to liquid staking hooks so transactions display meaningful information in the TxHistoryDrawer: - Deposit: shows token address and amount with correct symbol - Request redeem: shows asset address and shares count - Redeem: shows asset address and shares count Also fix shares formatting to display without a token symbol suffix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…earer labels - Rename share columns for clarity: "Your Shares" vs "Total Shares" - Add optimistic redeem request display to avoid waiting for indexer - Refetch user position after redeem/claim for immediate UI updates - Fix TxConfirmationModal to not append token symbol to share amounts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Apply code formatting fixes across multiple files (dependency arrays, type annotations) - Remove approximate asset value display from liquid staking redeem page to reduce confusion - Convert ABI files from JSON-style to JavaScript object-style formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The commit 15279a9 synced ABIs from tnt-core with a new diamond pattern contract architecture, but the dapp code still expects the old function signatures (delegate, deposit, claimDelegatorRewards, etc.). - Revert multiAssetDelegation.ts, tangle.ts, blueprintServiceManager.ts, and operatorStatusRegistry.ts to pre-sync versions - Fix parseEventLogs type assertion in useServiceRequest.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Conflicts resolved: - tokenMetadata.ts: kept chain-separated structure, merged v2 addresses - claim-relayer: accepted deletion - multiAssetDelegation.ts: accepted v2 ABI - tangle.ts: accepted v2 ABI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix NetworkType usage in processLeaderboardRecord.ts (use string literal) - Add chainId parameter to getCachedTokenMetadata call in RestakingAssetsTable - Import EIP1193Provider from viem in useViemWalletClient - Update Deposit button in VaultsTable to match Redeem button style 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Critical fixes: - Replace incorrect useRef with useMemo for static Icon objects - Fix memory leak from uncleaned setTimeout in redeem form - Fix optimistic requests claimable check by filtering out unindexed requests - Sync form state with useAllBlueprints in create-vault - Add timestamp tolerance to optimistic request cleanup to prevent race conditions Important fixes: - Remove fragile error string matching for ERC20 approval retry - Fix auto-close timer to check tx hash before closing modal - Limit dismissedHashes Set size to prevent memory growth - Standardize isNumericString to use faster regex implementation Suggestions: - Remove dead code exports from tokenMetadata.ts - Create useFormSetValue hook to consolidate setValue wrapper pattern - Standardize number formatting to use addCommasToNumber 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved ABI conflict by taking v2 version 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Display an orange warning banner and update button text to inform users when the relayer fails and they need to pay gas fees directly from their wallet. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Expand the TangleMigration contract ABI to include all functions, events, and error types. Add Base Sepolia chain icon for network selection UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @vutuanlinh2k2's task —— View job PR Review CompleteReviewing PR #3091: QA: Claim migration and liquid staking improvements Todo List:
Review SummaryThis is a substantial QA improvement PR with solid technical implementation. The changes enhance user experience across claim migration, liquid staking, and general UI improvements while maintaining good code quality. 🟢 Strengths1. Chain-Aware Token Metadata (
2. Optimistic Updates in Liquid Staking (
3. Form UX Improvements (
4. URL Query Parameter Pre-selection
🟡 Areas for Improvement1. Performance Considerations In queryKey: ['evmAssetMetadatas', evmAssetIds, viemPublicClient?.chain?.id]Consider using a sorted/hashed version for large arrays to prevent unnecessary re-renders when array order changes. 2. Error Handling in Claim Eligibility ( The file contains a massive ABI definition (lines 30-700+) that should be extracted to a separate ABI file following project conventions. ABIs belong in 3. Transaction History Component ( The sorting logic could be optimized: // Current: Creates new array each time
.slice()
.sort((a, b) => b.timestamp - a.timestamp)
// Better: Use useMemo for sorting
const sortedTransactions = useMemo(() =>
relevantTransactions?.toSorted((a, b) => b.timestamp - a.timestamp) ?? []
, [relevantTransactions]);4. Vault Display Logic ( The name parsing logic could fail silently: // Add fallback for failed regex
const displayName = useMemo(() => {
if (tvlSymbol) return `${tvlSymbol} Vault`;
const match = vaultName.match(/Liquid Delegation (\w+)/);
return match?.[1] ? `${match[1]} Vault` : vaultName;
}, [tvlSymbol, vaultName]);🔒 Security & Best Practices1. Address Validation 2. Data Sanitization 3. Environment Variables 🚀 Notable Improvements
📝 Minor Suggestions
Final Recommendation✅ APPROVE - This PR significantly improves user experience while maintaining code quality. The optimistic updates, chain-aware metadata, and improved vault displays are well-implemented. Address the minor performance and organization suggestions in follow-up work. |
Remove attempt counter from the progress message to provide a cleaner user experience during proof generation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Test plan
🤖 Generated with Claude Code