Add ustAmountIn to cross parameters interfaces

This commit is contained in:
Karl Kempe 2022-01-27 01:44:10 +00:00
parent 1c3b6908a9
commit b4804451b2
1 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,7 @@ export interface RelayerFee {
export interface ExactInCrossParameters { export interface ExactInCrossParameters {
amountIn: string; amountIn: string;
ustAmountIn: string;
minAmountOut: string; minAmountOut: string;
src: ExactInParameters | undefined; src: ExactInParameters | undefined;
dst: ExactInParameters | undefined; dst: ExactInParameters | undefined;
@ -119,6 +120,7 @@ export interface ExactInCrossParameters {
export interface ExactOutCrossParameters { export interface ExactOutCrossParameters {
amountOut: string; amountOut: string;
ustAmountIn: string;
maxAmountIn: string; maxAmountIn: string;
src: ExactOutParameters | undefined; src: ExactOutParameters | undefined;
dst: ExactOutParameters | undefined; dst: ExactOutParameters | undefined;
@ -236,6 +238,7 @@ export class UniswapToUniswapQuoter {
// organize parameters // organize parameters
const params: ExactInCrossParameters = { const params: ExactInCrossParameters = {
amountIn: amountIn, amountIn: amountIn,
ustAmountIn: dstAmountInAfterFee,
minAmountOut: dstMinAmountOut, minAmountOut: dstMinAmountOut,
src: this.makeSrcExactInParameters(amountIn, srcMinAmountOut), src: this.makeSrcExactInParameters(amountIn, srcMinAmountOut),
dst: this.makeDstExactInParameters(dstAmountInAfterFee, dstMinAmountOut), dst: this.makeDstExactInParameters(dstAmountInAfterFee, dstMinAmountOut),
@ -303,6 +306,7 @@ export class UniswapToUniswapQuoter {
// organize parameters // organize parameters
const params: ExactOutCrossParameters = { const params: ExactOutCrossParameters = {
amountOut: amountOut, amountOut: amountOut,
ustAmountIn: dstMaxAmountIn,
maxAmountIn: srcMaxAmountIn, maxAmountIn: srcMaxAmountIn,
src: this.makeSrcExactOutParameters( src: this.makeSrcExactOutParameters(
srcAmountOutBeforeFee, srcAmountOutBeforeFee,