You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds analytics-only wallet connection recording for Studio, keyed by normalized wallet address instead of user accounts.
Adds a wallet_connection_analytics table with first/last connection timestamps, connect count, server-observed IP, user agent, and origin metadata.
Adds /api/analytics/wallet-connections as a focused FastAPI endpoint that derives IP from trusted proxy handling and does not trust client-supplied IP.
Calls the endpoint from the frontend wallet sync path after connect/account changes without blocking wallet UX.
Extracts the existing trusted-proxy client IP resolver so rate limiting and analytics use the same behavior.
Privacy / Product Notes
This is analytics-only. The stored wallet address and request metadata are not authentication or identity proof, and wallet addresses can be spoofed by client-side calls. Metadata is limited to IP, user agent, and Origin headers with bounded lengths; no request body beyond the wallet address is collected.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: df14f563-d1a4-4f6d-9119-ecb95734fe2f
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch codex/wallet-connect-analytics
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds analytics-only wallet connection recording for Studio, keyed by normalized wallet address instead of user accounts.
wallet_connection_analyticstable with first/last connection timestamps, connect count, server-observed IP, user agent, and origin metadata./api/analytics/wallet-connectionsas a focused FastAPI endpoint that derives IP from trusted proxy handling and does not trust client-supplied IP.Privacy / Product Notes
This is analytics-only. The stored wallet address and request metadata are not authentication or identity proof, and wallet addresses can be spoofed by client-side calls. Metadata is limited to IP, user agent, and Origin headers with bounded lengths; no request body beyond the wallet address is collected.
Validation
/Users/edgars/Dev/genlayer-studio/.venv/bin/python -m pytest tests/unit/test_wallet_connection_analytics_service.py tests/unit/test_wallet_analytics_router.py tests/unit/test_rate_limit_middleware.pynpm run test -- --run test/unit/hooks/useWalletSync.test.ts test/unit/services/walletAnalytics.test.ts/Users/edgars/Dev/genlayer-studio/.venv/bin/python -m black --check backend/protocol_rpc/client_ip.py backend/protocol_rpc/rate_limit_middleware.py backend/protocol_rpc/analytics_router.py backend/services/wallet_connection_analytics_service.py backend/database_handler/models.py tests/unit/test_wallet_connection_analytics_service.py tests/unit/test_wallet_analytics_router.py/Users/edgars/Dev/genlayer-studio/frontend/node_modules/.bin/prettier --check src/hooks/useWalletSync.ts src/services/walletAnalytics.ts test/unit/hooks/useWalletSync.test.ts test/unit/services/walletAnalytics.test.ts