Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda committed Dec 14, 2023
1 parent f0172ec commit bbcfd65
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/lib/V2DutchOrderLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ library V2DutchOrderLib {
"DutchOutput[] outputs)"
);

bytes internal constant ORDER_TYPE = abi.encodePacked(
V2_DUTCH_ORDER_TYPE, DutchOrderLib.DUTCH_OUTPUT_TYPE, OrderInfoLib.ORDER_INFO_TYPE
);
bytes internal constant ORDER_TYPE =
abi.encodePacked(V2_DUTCH_ORDER_TYPE, DutchOrderLib.DUTCH_OUTPUT_TYPE, OrderInfoLib.ORDER_INFO_TYPE);
bytes32 internal constant ORDER_TYPE_HASH = keccak256(ORDER_TYPE);

/// @dev Note that sub-structs have to be defined in alphabetical order in the EIP-712 spec
Expand Down
9 changes: 8 additions & 1 deletion src/reactors/V2DutchOrderReactor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import {IPermit2} from "permit2/src/interfaces/IPermit2.sol";
import {ExclusivityOverrideLib} from "../lib/ExclusivityOverrideLib.sol";
import {Permit2Lib} from "../lib/Permit2Lib.sol";
import {DutchDecayLib} from "../lib/DutchDecayLib.sol";
import {V2DutchOrderLib, V2DutchOrder, V2DutchOrderInner, CosignedV2DutchOrder, DutchOutput, DutchInput} from "../lib/V2DutchOrderLib.sol";
import {
V2DutchOrderLib,
V2DutchOrder,
V2DutchOrderInner,
CosignedV2DutchOrder,
DutchOutput,
DutchInput
} from "../lib/V2DutchOrderLib.sol";
import {SignedOrder, ResolvedOrder} from "../base/ReactorStructs.sol";

/// @notice Reactor for v2 dutch orders
Expand Down
11 changes: 2 additions & 9 deletions test/reactors/V2DutchOrderReactor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ contract V2DutchOrderTest is PermitSignature, DeployPermit2, BaseReactorTest {
outputOverrides: outputOverrides
});
orderHash = order.hash();
CosignedV2DutchOrder memory cosigned = CosignedV2DutchOrder({
order: order,
signature: cosignOrder(order)
});
CosignedV2DutchOrder memory cosigned = CosignedV2DutchOrder({order: order, signature: cosignOrder(order)});
return (SignedOrder(abi.encode(cosigned), signOrder(swapperPrivateKey, address(permit2), order)), orderHash);
}

Expand All @@ -94,11 +91,7 @@ contract V2DutchOrderTest is PermitSignature, DeployPermit2, BaseReactorTest {
sig = bytes.concat(r, s, bytes1(v));
}

function generateSignedOrders(V2DutchOrder[] memory orders)
private
view
returns (SignedOrder[] memory result)
{
function generateSignedOrders(V2DutchOrder[] memory orders) private view returns (SignedOrder[] memory result) {
result = new SignedOrder[](orders.length);
for (uint256 i = 0; i < orders.length; i++) {
bytes memory sig = signOrder(swapperPrivateKey, address(permit2), orders[i]);
Expand Down

0 comments on commit bbcfd65

Please sign in to comment.