Conversation
📝 WalkthroughWalkthroughThis PR increments the app version to 3.7.2 and adds platform-specific guards to ensure Seeker wallet functionality and related module imports only occur on Android, preventing iOS runtime crashes from loading Android-specific dependencies. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/hooks/useSeekerWallet.tsx (1)
18-23: MovegetSeekerWalletManager()call behind Platform guard to avoid loading iOS-incompatible dependencies.
getSeekerWalletManager()triggers instantiation ofSeekerWalletManager, which statically importsexpo-seed-vaultand other iOS-incompatible modules. Although the hook early-returns on non-Android platforms, these imports execute unconditionally at the component root, causing unnecessary module loading on iOS.Suggested approach
export const useSeekerWallet = () => { const [isAvailable, setIsAvailable] = useState<boolean | null>(null) const [isAuthorized, setIsAuthorized] = useState(false) const messageManager = getMessageManager() - const seekerManager = getSeekerWalletManager() useEffect(() => { if (Platform.OS !== 'android') { return } + const seekerManager = getSeekerWalletManager() // Check availability on mount void seekerManager.checkAvailability().then(available => {(Similarly for the second
useEffect.)
gomesalexandre
left a comment
There was a problem hiding this comment.
Untested but discussed in DM, sounds sane to me
iOS was crashing because we were trying to initiate the seeker wallet manager but this is importing a library that is trying to get an android module, we need to guard that to avoid the crash!
How to test
run
yarn expo iosand verify in the emulator that the app is not crashingSummary by CodeRabbit
Version 3.7.2