Skip to content

chore: clean up console warnings and minor fixes#12277

Merged
kaladinlight merged 1 commit intodevelopfrom
fix/console-warnings
Apr 10, 2026
Merged

chore: clean up console warnings and minor fixes#12277
kaladinlight merged 1 commit intodevelopfrom
fix/console-warnings

Conversation

@kaladinlight
Copy link
Copy Markdown
Contributor

@kaladinlight kaladinlight commented Apr 10, 2026

Description

General cleanup of console warnings, deprecation notices, and minor issues.

  • Remove deprecated document-domain Permissions-Policy header (browsers no longer recognize it)
  • Use scrollY.on('change', ...) instead of deprecated scrollY.onChange(...) (framer-motion API update)
  • Prevent non-DOM Route props from leaking onto MobileNavLink <Button> element
  • Add optional chaining for appData.metadata in limit order filtering to prevent runtime errors
  • Remove noisy console.warn/console.log statements in market service and portals utils
  • Remove unused catch variable in swapper utils
  • Add fallback RPC URL spreads to ethereal and sei CSP configs

Risk

Low — no behavioral changes, only removing deprecated API usage, unnecessary logging, and fixing prop spreading.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None.

Testing

Engineering

  • Verify no console warnings for document-domain, motion(), value.onChange, or mobileNav prop
  • Verify mobile nav still renders and navigates correctly
  • Verify limit orders load without errors

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

N/A

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed null safety handling in order filtering to prevent runtime errors with missing metadata.
  • Improvements

    • Enhanced network reliability by adding fallback RPC endpoints for Ethereal and Sei chains.
    • Improved security headers and content security policy configurations.
  • Refactor

    • Streamlined component props and internal error handling for better maintainability.

- Remove deprecated `document-domain` Permissions-Policy header
- Use `scrollY.on('change', ...)` instead of deprecated `scrollY.onChange(...)`
- Prevent non-DOM Route props from leaking onto MobileNavLink Button
- Add optional chaining for appData.metadata in limit order filtering
- Remove noisy console.warn/log statements in market service and portals
- Remove unused catch variable in swapper utils
- Add fallback RPC URL spreads to ethereal and sei CSP configs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kaladinlight kaladinlight requested a review from a team as a code owner April 10, 2026 21:21
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: edef82e9-2f98-49ce-ab2c-2815132be569

📥 Commits

Reviewing files that changed from the base of the PR and between 51bf5c1 and f2c9f7b.

📒 Files selected for processing (10)
  • headers/csps/chains/ethereal.ts
  • headers/csps/chains/sei.ts
  • headers/index.ts
  • packages/swapper/src/utils.ts
  • src/components/Layout/Header/Header.tsx
  • src/components/Layout/Header/NavBar/MobileNavLink.tsx
  • src/lib/market-service/coingecko/coingecko.ts
  • src/lib/market-service/foxy/foxy.ts
  • src/lib/portals/utils.ts
  • src/state/apis/limit-orders/limitOrderApi.ts
💤 Files with no reviewable changes (2)
  • headers/index.ts
  • src/lib/market-service/coingecko/coingecko.ts

📝 Walkthrough

Walkthrough

This PR refactors error handling and logging across multiple services, updates CSP configurations with additional RPC fallbacks, removes a header directive, modifies a Framer Motion API call pattern, simplifies a component's type signature, and improves null-safety in limit order filtering.

Changes

Cohort / File(s) Summary
CSP Configuration Updates
headers/csps/chains/ethereal.ts, headers/csps/chains/sei.ts, headers/index.ts
Extended connect-src directives in chain CSP configs to include fallback RPC endpoints via spread operator; removed Permissions-Policy header from base headers.
Error Handling & Logging Cleanup
packages/swapper/src/utils.ts, src/lib/market-service/coingecko/coingecko.ts, src/lib/market-service/foxy/foxy.ts, src/lib/portals/utils.ts
Removed console.error and console.warn calls in catch blocks and conditional branches while preserving core error handling and control flow logic.
Component API & Type Updates
src/components/Layout/Header/Header.tsx, src/components/Layout/Header/NavBar/MobileNavLink.tsx
Updated Framer Motion scroll listener API from onChange() to on('change', ...); removed ButtonProps intersection from MobileNavLinkProps type and stopped forwarding unused button props to underlying <Button> component.
API Logic Improvements
src/state/apis/limit-orders/limitOrderApi.ts
Added null-safety check for missing metadata field on ParsedAppData to prevent runtime exceptions during order filtering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Whiskers twitch as bugs I mend,
CSP chains that never end,
Error logs? No more, goodbye!
Safer swaps now soar so high,
Types align, components shine bright! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: clean up console warnings and minor fixes' accurately summarizes the main focus of the PR—removing deprecated APIs, cleaning up console statements, and fixing minor issues across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/console-warnings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kaladinlight kaladinlight enabled auto-merge (squash) April 10, 2026 21:24
@kaladinlight kaladinlight merged commit ea2478f into develop Apr 10, 2026
4 checks passed
@kaladinlight kaladinlight deleted the fix/console-warnings branch April 10, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant