Skip to content

Commit

Permalink
check case of missing swapConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
xrsv committed Feb 5, 2025
1 parent c08238b commit e1c266a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/routers/alpha-router/alpha-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,9 @@ export class AlphaRouter
const availableProtocolsSet = new Set(Object.values(Protocol));
const requestedProtocolsSet = new Set(protocols);
if (
swapConfig?.type === SwapType.UNIVERSAL_ROUTER &&
swapConfig.version === UniversalRouterVersion.V1_2
!swapConfig ||
(swapConfig.type === SwapType.UNIVERSAL_ROUTER &&
swapConfig.version === UniversalRouterVersion.V1_2)
) {
availableProtocolsSet.delete(Protocol.V4);
if (requestedProtocolsSet.has(Protocol.V4)) {
Expand Down

0 comments on commit e1c266a

Please sign in to comment.