fix(managed-wallet): skip storage sync while wallet has no address#3512
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesManaged wallet persistence
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3512 +/- ##
==========================================
- Coverage 73.85% 72.87% -0.99%
==========================================
Files 1139 1049 -90
Lines 29704 27357 -2347
Branches 7445 6986 -459
==========================================
- Hits 21939 19937 -2002
+ Misses 6854 6540 -314
+ Partials 911 880 -31
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
Why
New trial users intermittently hit the Sentry warning
Cannot create managed wallet entry without address, creditAmount and isTrialing(Sentry 7542732522). The API legitimately returns a wallet with anulladdress while trial provisioning is in flight (or after an interrupted provision), and the storage-sync effect inuseManagedWallettried to persist that address-less wallet on every render.Fixes CON-743
Related to CON-744 (backend redesign that makes address-less wallets unobservable in API responses)
What
useManagedWalletwhile the wallet has no address — an address-less wallet can neither create a valid storage entry nor safely merge into an existing one.selected.Verified end-to-end against a local deploy-web with a mocked
v1/walletsresponse: pre-fix the warning fires 4x on page load, post-fix zero, and with-address sync still writes the storage entry.Summary by CodeRabbit
Bug Fixes
Tests