diff --git a/components/swap/SwapReviewRouteInfo.tsx b/components/swap/SwapReviewRouteInfo.tsx index 9913c8e2..fbd301de 100644 --- a/components/swap/SwapReviewRouteInfo.tsx +++ b/components/swap/SwapReviewRouteInfo.tsx @@ -151,6 +151,7 @@ export const fetchJupiterTransaction = async ( // This is the ATA account for the output token where the fee will be sent to. If you are swapping from SOL->USDC then this would be the USDC ATA you want to collect the fee. // feeAccount: 'fee_account_public_key', slippageBps: Math.ceil(slippage * 100), + maxAccounts: 50 }), }) ).json() diff --git a/components/swap/useQuoteRoutes.ts b/components/swap/useQuoteRoutes.ts index 76bb4d61..cb80441c 100644 --- a/components/swap/useQuoteRoutes.ts +++ b/components/swap/useQuoteRoutes.ts @@ -30,6 +30,7 @@ const fetchJupiterRoute = async ( swapMode = 'ExactIn', feeBps = 0, onlyDirectRoutes = true, + maxAccounts = 50 ) => { { const paramsString = new URLSearchParams({ @@ -38,6 +39,7 @@ const fetchJupiterRoute = async ( amount: amount.toString(), slippageBps: Math.ceil(slippage * 100).toString(), pfeeBps: feeBps.toString(), + maxAccounts: maxAccounts.toString(), swapMode, onlyDirectRoutes: `${onlyDirectRoutes}`, }).toString()