Skip to content

Commit

Permalink
fix: inverse bool bug in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed May 17, 2024
1 parent b5f97d8 commit d6da242
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/contracts/BaseBCoWPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ abstract contract BaseBCoWPool is IERC1271 {
(GPv2Order.Data memory order, TradingParams memory tradingParams) =
abi.decode(signature, (GPv2Order.Data, TradingParams));

if (tradingParamsHash[hash(tradingParams)]) {
if (!tradingParamsHash[hash(tradingParams)]) {
revert TradingParamsDoNotMatchHash();
}
bytes32 orderHash = order.hash(solutionSettlerDomainSeparator);
Expand Down
5 changes: 5 additions & 0 deletions test/integration/PoolSwap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ abstract contract PoolSwapIntegrationTest is Test, GasSnapshot {
pool.bind(address(tokenB), 1e18, 8e18); // 80%

pool.finalize();

BaseBCoWPool(address(pool)).enableTrading(
BaseBCoWPool.TradingParams({sellToken: tokenA, buyToken: tokenB, appData: ''})
);

vm.stopPrank();
}

Expand Down

0 comments on commit d6da242

Please sign in to comment.