Use slippage adjusted swap quote for two hop swap (#106)
This commit is contained in:
parent
0fdf8e5dc6
commit
42ca95a4bc
|
@ -97,7 +97,7 @@ export async function getSwapFromRoute(
|
|||
]
|
||||
);
|
||||
|
||||
const inputAmount = quoteOne.estimatedAmountIn;
|
||||
const inputAmount = quoteOne.amountSpecifiedIsInput ? quoteOne.estimatedAmountIn : quoteOne.otherAmountThreshold;
|
||||
addOrNative(mintOneA.toString(), quoteOne.aToB ? inputAmount : ZERO);
|
||||
addOrNative(mintOneB.toString(), !quoteOne.aToB ? inputAmount : ZERO);
|
||||
addOrNative(mintTwoA.toString(), ZERO);
|
||||
|
|
Loading…
Reference in New Issue