@@ -77,7 +77,7 @@ contract PerpV2LeverageModule is ModuleBase, ReentrancyGuard, Ownable, IModuleIs
7777 address baseToken; // Virtual token minted by the Perp protocol
7878 bool isBaseToQuote; // When true, `baseToken` is being sold, when false, bought
7979 bool isExactInput; // When true, `amount` is the swap input, when false, the swap output
80- uint256 amount ; // Quantity in 10**18 decimals
80+ uint256 baseTokenAmount ; // Base token quantity in 10**18 decimals
8181 uint256 oppositeAmountBound; // vUSDC pay or receive quantity bound (see `_createAndValidateActionInfoNotionalNotional` for details)
8282 }
8383
@@ -960,7 +960,7 @@ contract PerpV2LeverageModule is ModuleBase, ReentrancyGuard, Ownable, IModuleIs
960960 baseToken: _actionInfo.baseToken,
961961 isBaseToQuote: _actionInfo.isBaseToQuote,
962962 isExactInput: _actionInfo.isExactInput,
963- amount: _actionInfo.amount ,
963+ amount: _actionInfo.baseTokenAmount ,
964964 oppositeAmountBound: _actionInfo.oppositeAmountBound,
965965 deadline: PreciseUnitMath.maxUint256 (),
966966 sqrtPriceLimitX96: 0 ,
@@ -981,7 +981,7 @@ contract PerpV2LeverageModule is ModuleBase, ReentrancyGuard, Ownable, IModuleIs
981981 baseToken: _actionInfo.baseToken,
982982 isBaseToQuote: _actionInfo.isBaseToQuote,
983983 isExactInput: _actionInfo.isExactInput,
984- amount: _actionInfo.amount ,
984+ amount: _actionInfo.baseTokenAmount ,
985985 sqrtPriceLimitX96: 0
986986 });
987987
@@ -1081,7 +1081,7 @@ contract PerpV2LeverageModule is ModuleBase, ReentrancyGuard, Ownable, IModuleIs
10811081 baseToken: _baseToken,
10821082 isBaseToQuote: isShort,
10831083 isExactInput: isShort,
1084- amount : _baseTokenQuantity.abs (),
1084+ baseTokenAmount : _baseTokenQuantity.abs (),
10851085 oppositeAmountBound: _quoteReceiveQuantity
10861086 });
10871087 }
0 commit comments