feat(tron): upgrade to TIP-1193 protocol and add network change detection#20
feat(tron): upgrade to TIP-1193 protocol and add network change detection#20
Conversation
…tion - Replace deprecated connect/networkChanged events with TIP-1193 standard chainChanged/accountsChanged - Add setNode message handler to detect network switches (mainnet ↔ nile, etc.) - Update event listener cleanup to match new event names - Improve comments to reflect dual-channel event handling (window messages + direct events) - Align with EIP-1193 patterns used in EVM handler
|
Caution Review failedThe pull request is closed. WalkthroughThis PR updates the TronLink wallet handler to adopt TIP-1193 protocol standards, replacing legacy event listeners (connect, networkChanged) with their standardized counterparts (chainChanged, accountsChanged), and adding support for node/network change messages via setNode action. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Changes
Event Protocol Upgrade
connectandnetworkChangedevents with TIP-1193 standardchainChangedandaccountsChangedNetwork Change Detection
setNodemessage handler to detect network switches (mainnet ↔ nile, etc.)message.data.node.chainIdCode Quality
Test Plan
Related Issues
Fixes issues with TronLink network change detection and modernizes event handling.
Summary by CodeRabbit