fix(desktop): use Web3Auth devnet network for production builds#462
Conversation
The Web3Auth client ID is registered on sapphire_devnet, but production builds set VITE_ENVIRONMENT=production which mapped to MAINNET, causing a network mismatch error on login. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: b38f63f2e439
The web app deploy uses VITE_ENVIRONMENT=staging which already maps to DEVNET. Only the desktop release workflow sets production, so only the desktop config needed the change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: e32b56a89d3d
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 0dd0f9327354
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 41 minutes and 27 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
Release Preview
|
There was a problem hiding this comment.
Pull request overview
Adjusts CipherBox Desktop’s Web3Auth Core Kit network selection for production desktop builds to avoid Web3Auth “client network mismatch” failures during login, and updates the desktop package’s release-please configuration.
Changes:
- Remaps
VITE_ENVIRONMENT=productionto useWEB3AUTH_NETWORK.DEVNETin the desktop Core Kit initialization. - Updates
release-please-config.jsonforapps/desktop(inlinesextra-filesformatting and bumpsrelease-as).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| release-please-config.json | Updates desktop release-please settings (extra-files formatting + forces next desktop release version). |
| apps/desktop/src/auth.ts | Changes the Web3Auth network mapping for production builds in the desktop auth module. |
| ci: WEB3AUTH_NETWORK.DEVNET, | ||
| staging: WEB3AUTH_NETWORK.DEVNET, | ||
| production: WEB3AUTH_NETWORK.MAINNET, | ||
| production: WEB3AUTH_NETWORK.DEVNET, |
| "bump-minor-pre-major": true, | ||
| "extra-files": [ | ||
| "src-tauri/tauri.conf.json", |
Pull request was closed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
==========================================
+ Coverage 62.37% 62.65% +0.28%
==========================================
Files 135 135
Lines 10157 10157
Branches 1083 1083
==========================================
+ Hits 6335 6364 +29
+ Misses 3598 3573 -25
+ Partials 224 220 -4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
VITE_ENVIRONMENT=production, which mapped toWEB3AUTH_NETWORK.MAINNETin the Core Kit network configsapphire_devnet, causing a network mismatch error on login:Client network mismatch, clientId ... belongs to network: sapphire_devnet, and app is configured on network: sapphire_mainnetproductionmapping toDEVNETin the desktop Core Kit config to match the actual client ID registrationTest plan
🤖 Generated with Claude Code