feat(adapters): decode reduceFee bool from bytes data

TODO: apply reduce fee logic
This commit is contained in:
PierreMkt
2024-08-02 12:49:37 -04:00
parent ec903734e0
commit 6f41147f91

View File

@@ -123,6 +123,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
) external override returns (Trade memory trade) {
uint256 sellAmount;
IVault.SwapKind kind;
bool reduceFee = abi.decode(abi.encodePacked(data), (bool));
uint256 limit; // TODO set this slippage limit properly
if (side == OrderSide.Sell) {
kind = IVault.SwapKind.GIVEN_IN;