refactor: remove ScreenComponent any cast from Ramp Deposit routes#28114
refactor: remove ScreenComponent any cast from Ramp Deposit routes#28114
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| } | ||
|
|
||
| const MainRoutes = ({ route }: MainRoutesProps) => { | ||
| const MainRoutes = () => { |
There was a problem hiding this comment.
ScreenComponent any cast not removed as intended
Low Severity
The type ScreenComponent = React.ComponentType<any> alias (line 56), its eslint-disable comment (line 55), and the as ScreenComponent cast on line 205 were all supposed to be removed per the PR title and description, but they remain. Now that MainRoutes accepts no props, the cast is unnecessary — a bare () => JSX.Element is already assignable to the navigator's component prop. The no-explicit-any violation this PR was designed to eliminate is still present.
Additional Locations (1)
There was a problem hiding this comment.
will do this in clean up pr
Migrate MainRoutes component in Ramp Deposit routes from prop-based route access to useRoute() hook, eliminating the type ScreenComponent = React.ComponentType<any> escape hatch. Made-with: Cursor
2c21790 to
7581ed2
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |





Description
Migrate the local
MainRoutescomponent in Ramp Deposit routes from prop-based route access touseRoute()hook, eliminating thetype ScreenComponent = React.ComponentType<any>escape hatch.Part of the React Navigation v6 migration effort to remove
no-explicit-anyviolations from route files.Changes:
routes/index.tsx: SwitchMainRoutestouseRoute(), removeMainRoutesProps,ScreenComponentalias, and castChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
N/A — pure refactoring with no user-facing behavior change.
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Note
Low Risk
Low risk refactor limited to navigation param plumbing; behavior should remain unchanged aside from potential typing/runtime differences if the route context is misconfigured.
Overview
Refactors
app/components/UI/Ramp/Deposit/routes/index.tsxsoMainRoutesno longer accepts arouteprop and instead pullsDepositNavigationParamsfrom React Navigation viauseRoute().This removes the local
MainRoutesPropstyping and updates imports accordingly, aiming to simplify typing and reduceany-style escape hatches during the React Navigation v6 migration.Written by Cursor Bugbot for commit b1db237. This will update automatically on new commits. Configure here.