Skip to content

fix: cleanup useQuoteQuery and remove stray console.log#217

Open
happy-edge wants to merge 1 commit into
jup-ag:mainfrom
happy-edge:fix/quote-query-bugs
Open

fix: cleanup useQuoteQuery and remove stray console.log#217
happy-edge wants to merge 1 commit into
jup-ag:mainfrom
happy-edge:fix/quote-query-bugs

Conversation

@happy-edge

Copy link
Copy Markdown

Summary

This PR cleans up minor issues in the codebase:

Changes

  • Fix typo: 'conver''convert' in superstruct error message
  • Remove unused import: keepPreviousData was imported but never used
  • Fix code formatting: Consistent spacing around assignments
  • Remove console.log: Removed stray console.log('Swap error', error) from Form.tsx
  • Add TODO: Note about hardcoded excludeRouters array for future consideration

Files Changed

  • src/queries/useQuoteQuery.ts
  • src/components/Form.tsx

Testing

  • No functional changes, purely cleanup
  • Verified builds successfully

- Fix typo: 'conver' → 'convert' in error message
- Remove unused import (keepPreviousData)
- Fix code formatting and spacing
- Remove console.log from Form.tsx error handler
- Add TODO comment for hardcoded excludeRouters
@vercel

vercel Bot commented Feb 6, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the wowcats Team on Vercel.

A member of the Team first needs to authorize it.

happy-edge pushed a commit to happy-edge/plugin that referenced this pull request Feb 6, 2026
Previously, when excludeDexes was specified, the plugin would always
add a hardcoded list of excludeRouters. This was undocumented and
couldn't be overridden.

Changes:
- Add excludeRouters to FormProps interface with documentation
- Only apply default excludeRouters if user doesn't specify their own
- Extract default routers to named constant for clarity
- Fix typo and remove unused import (from PR jup-ag#217)

Users can now:
1. Use excludeDexes alone (gets default router exclusions)
2. Use excludeRouters alone (explicit control)
3. Use both for full control
4. Pass empty excludeRouters=[] to opt out of default behavior

@thejesh23 thejesh23 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly low-risk cleanups, but worth scrutinizing the empty catch in Form.tsx: replacing the console.log with a comment-only catch quietly swallows errors and relies on the runtime invariant that the mutation always sets setLastSwapResult before throwing — that isn't enforced by types and will rot silently if a future refactor changes it. Safer to either let the error propagate (throw error or remove the try/catch) or keep a real logged side-effect (console.error gated on dev). Empty catch with a justification comment looks intentional in git blame but is the riskiest of the three options. Rest of the cleanup (typo fix, unused keepPreviousData import, formatting) looks fine.

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.

2 participants