-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unwire the legacy router #3757
Unwire the legacy router #3757
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
WalkthroughThe recent changes streamline module exports and simplify router management across the codebase. Key updates include the removal of specific exports, the introduction of a default router function, and the elimination of the Changes
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we should go further and just call the SQS out-given-in query function and not even conform to the TokenOutGivenInRouter
interface. We should be able to delete the pools package entirely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I will try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good cleanup step.
Without spending tons of time digging into the code, I think the next step to evetually delete the pools package (or help us be ready to) would be to copy over any imports directly from the pools package into /packages/server/src/queries/sidecar/router.ts (like error types, the router interface, etc).
Basically removing references into the pools package. Then when the tRPC migration is complete and all legacy pools queries are deleted, we can just delete that package in entirety.
Thanks for suggestions - tracked here: #3764 |
Merging - appreciate the reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
packages/trpc/src/__tests_e2e__/swap-router.spec.ts (1)
20-20
: Impact of RemovingRouterInputs
The
RouterInputs
type is used in several files across the codebase. Removing it could lead to type-related issues in these files:
packages/web/utils/trpc.ts
packages/web/hooks/use-swap.tsx
packages/web/hooks/mutations/one-click-trading/use-create-one-click-trading-session.tsx
packages/web/components/table/asset-info.tsx
packages/web/components/bridge/use-bridge-quotes.ts
packages/web/components/table/asset-balances.tsx
Please ensure that these usages are addressed to maintain type safety.
Analysis chain
Verify the impact of removing
RouterInputs
.The
RouterInputs
type declaration has been removed. Ensure that this does not affect type safety or lead to any type-related issues in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of removing `RouterInputs` type declaration. # Test: Search for the usage of `RouterInputs` in the codebase. Expect: No occurrences. rg --type typescript 'RouterInputs'Length of output: 70
Script:
#!/bin/bash # Description: Verify the impact of removing `RouterInputs` type declaration. # Test: Search for the usage of `RouterInputs` in the codebase. Expect: No occurrences. rg --type ts 'RouterInputs'Length of output: 1422
What is the purpose of the change:
Next PR: