Skip to content

Conversation

@happy-edge
Copy link

Summary

When excludeDexes is specified, the plugin previously added a hardcoded list of excludeRouters without any way to override or opt out. This PR makes the behavior configurable.

Problem

// Before: User has no control over router exclusions
init({
  formProps: {
    excludeDexes: ['Raydium'], // Always adds hardcoded excludeRouters
  }
});

Solution

// After: User has full control
init({
  formProps: {
    excludeDexes: ['Raydium'],
    excludeRouters: ['okx'], // Override defaults
  }
});

// Or opt out of default router exclusions
init({
  formProps: {
    excludeDexes: ['Raydium'],
    excludeRouters: [], // Empty array = no router exclusions
  }
});

Changes

  • types/index.d.ts: Add excludeRouters to FormProps with JSDoc
  • SwapContext.tsx: Pass excludeRouters to quote query
  • useQuoteQuery.ts:

Backwards Compatible

Existing integrations work identically - the default behavior is preserved when excludeRouters is not specified.

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
@vercel
Copy link

vercel bot commented Feb 6, 2026

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

A member of the Team first needs to authorize it.

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