fix showing unlock when server is unreachable#570
Conversation
Deploying wallet-mutinynet with
|
| Latest commit: |
4f9bf6f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://99151509.arkade-wallet.pages.dev |
| Branch Preview URL: | https://server-unreachable.arkade-wallet.pages.dev |
Deploying wallet-bitcoin with
|
| Latest commit: |
4f9bf6f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4c9deafd.wallet-bitcoin.pages.dev |
| Branch Preview URL: | https://server-unreachable.wallet-bitcoin.pages.dev |
Deploying tmp-boltz-upstream-mainnet-arkade-wallet with
|
| Latest commit: |
4f9bf6f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e2790467.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
| Branch Preview URL: | https://server-unreachable.tmp-boltz-upstream-mainnet-arkade-wallet.pages.dev |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Review: ✅ Approved
1-line change, clean fix. Traced the full rendering pipeline to verify correctness.
What it does
When the ASP (arkd) is unreachable and the wallet is locked, the shouldShowUnlock guard on App.tsx:135 was forcing the rendered page to Pages.Unlock (line 175), overriding the navigation effect that already correctly routes to Pages.Unavailable (line 98). Adding && !aspInfo.unreachable lets the Unavailable screen render as intended.
Security check — lock bypass risk: None
Verified that going offline cannot expose wallet data:
- When
aspInfo.unreachableistrueandauthState === 'locked':shouldShowUnlock→false(this fix)shouldHoldOnLoading→false(becauseauthState === 'locked'short-circuits it)pageresolves toscreen, which theuseEffecthas set toPages.Unavailable
- The Unavailable page renders with
Tabs.None— no wallet content, no navbar - The wallet data remains locked;
unlockWallet()is never called
Not protocol-critical
This is a UI routing fix in the frontend wallet. No VTXO handling, transaction signing, or fund movement logic is touched.
LGTM — ship it.
🤖 Reviewed by Arkana
Avoid showing unlock screen (even when wallet is not locked) when arkd is unreachable.
Summary by CodeRabbit