Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds guards to avoid installing a safe Ethereum proxy when Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/providers/WagmiSetup.tsx`:
- Around line 59-67: The current guard uses
canAssignProperty(ethereumDescriptor) and returns early, which skips proxy
installation for descriptors that are writable only via defineProperty; change
the logic so you only skip when the descriptor is non-configurable, and for
configurable descriptors proceed to install the safe proxy by using
Object.defineProperty to replace window.ethereum with the proxy instead of
direct assignment; update the branches around
ethereumDescriptor/canAssignProperty checks in WagmiSetup (references:
ethereumDescriptor, canAssignProperty, logErrorSecurely,
w.__6529_safeEthereumProxyInstalled) and ensure the replacement uses
Object.defineProperty where the code currently assigns at the proxy installation
site so tests exercise non-configurable vs configurable cases appropriately.
In `@utils/sentry-client-filters.ts`:
- Around line 89-97: The current functions isAppUriFrame and
isInjectedAppUriFrame use filename ?? abs_path which misses cases where filename
is a non-app path but abs_path contains the app:// URI; update both to check
both fields explicitly (e.g., examine filename and abs_path separately) and
return true if either value is a string and matches the condition
(startsWith("app:///") for isAppUriFrame, includes(injectedAppUriPath) for
isInjectedAppUriFrame) so frames are classified correctly even when one field is
non-app.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8db5b659-c573-4b6b-b6e0-e7b1d260c97e
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
__tests__/components/providers/WagmiSetup.test.tsx__tests__/utils/sentry-client-filters.test.tscomponents/providers/WagmiSetup.tsxinstrumentation-client.tsutils/sentry-client-filters.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@utils/sentry-client-filters.ts`:
- Around line 199-204: The current return path treats an empty frames array as
present and then calls hasOnlyAppUriFrames([]) which returns false, letting
noise through; update the logic in the block that uses getHintExceptionStack,
injectedAppUriPath, and frames so that empty arrays are treated the same as
missing frames (i.e., consider frames === undefined OR frames.length === 0 as
the "no frames" case) and return true for that case or proceed to
hasOnlyAppUriFrames(frames) only when frames is a non-empty array.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cdcff760-fa78-4b2a-84a5-e0824e84770e
📒 Files selected for processing (4)
__tests__/components/providers/WagmiSetup.test.tsx__tests__/utils/sentry-client-filters.test.tscomponents/providers/WagmiSetup.tsxutils/sentry-client-filters.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- components/providers/WagmiSetup.tsx
- tests/components/providers/WagmiSetup.test.tsx
There was a problem hiding this comment.
🧹 Nitpick comments (1)
utils/sentry-client-filters.ts (1)
211-227: Consider potential false positives from stack trace matching.The
candidatesarray includesgetHintExceptionStack(hint)which returns the entire stack trace string. ThematchesWalletCollisionPatternfunction then checks if any pattern is contained anywhere in this string. While the patterns are specific (e.g., "cannot set property ethereum of #"), stack traces include file paths and could theoretically match if a file were named something containing "ethereum" or "tronlinkparams".This is likely acceptable given the specificity of the patterns and the additional
hasInjectedAppUriSignatureguard, but worth noting.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@utils/sentry-client-filters.ts` around lines 211 - 227, The current hasWalletCollisionSignature builds candidates including the entire stack string from getHintExceptionStack(hint), which can yield false positives when file paths contain pattern substrings; change the candidates assembly to split the stack into individual lines and only include stack lines that are likely error/message lines (e.g., exclude lines that look like file paths or stack frames — lines starting with "at " or matching common filepath patterns) before calling matchesWalletCollisionPattern; update hasWalletCollisionSignature to flatten the resulting array and run the same typeof string check and matchesWalletCollisionPattern against those filtered lines (references: hasWalletCollisionSignature, getHintExceptionStack, matchesWalletCollisionPattern, getBreadcrumbMessages).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@utils/sentry-client-filters.ts`:
- Around line 211-227: The current hasWalletCollisionSignature builds candidates
including the entire stack string from getHintExceptionStack(hint), which can
yield false positives when file paths contain pattern substrings; change the
candidates assembly to split the stack into individual lines and only include
stack lines that are likely error/message lines (e.g., exclude lines that look
like file paths or stack frames — lines starting with "at " or matching common
filepath patterns) before calling matchesWalletCollisionPattern; update
hasWalletCollisionSignature to flatten the resulting array and run the same
typeof string check and matchesWalletCollisionPattern against those filtered
lines (references: hasWalletCollisionSignature, getHintExceptionStack,
matchesWalletCollisionPattern, getBreadcrumbMessages).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2caf02e0-f34e-40f6-ae57-85ed6d9c7cae
📒 Files selected for processing (2)
__tests__/utils/sentry-client-filters.test.tsutils/sentry-client-filters.ts
|



Summary by CodeRabbit
Bug Fixes
New Features
Tests