feat: add Ledger app gate to Sui chain adapter#11450
Conversation
Co-authored-by: Capy <capy@capy.ai>
📝 WalkthroughWalkthroughThe Sui chain adapter now imports Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (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 |
NeOMakinG
left a comment
There was a problem hiding this comment.
https://jam.dev/c/2257af7e-8fec-4801-8154-77870e40b73d
Send has been prompting the app opening
Don't we have a way to naturally open that as an automated system instead of having to add this manually everywhere in every adapters?
Probably could abstract that even one more level up yes, though I'm not sure exactly how that would be holistically, since we need to decide which places do need app open if that makes sense. For second-class EVM chain-adapters like this one though, there should be no-need to duplicate code. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 46 @gomesalexandre: I've created issue #11478 to track the refactoring of Ledger app gating logic into The issue covers:
The issue has been assigned to you and includes an estimated effort of ~1 hour. This should eliminate the code duplication across second-class EVM chain adapters while leveraging OOP inheritance properly. 🧠 Learnings used |
Description
Add Ledger app verification to Sui chain adapter to ensure the Ledger Sui app is open before wallet operations. This prompts users to open the Sui app on their Ledger device if needed during address derivation and transaction signing.
Adds
verifyLedgerAppOpencalls to:getAddress- verifies app is open before deriving addressessignTransaction- verifies app is open before signingsignAndBroadcastTransaction- verifies app is open before signing and broadcastingThe Sui app configuration was already present in ledgerAppGate.ts, so only the adapter integration was needed.
Issue
N/A
Testing
Screenshots
https://jam.dev/c/21b43dd8-720a-4b26-bc0a-19c16f8e4074
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.