Return values not used for DFSExchangeCore.onChainSwap
Return values from `DFSExchangeCore.onChainSwap` are not used.\\n```\\nfunction \\_sell(ExchangeData memory exData) internal returns (address, uint256) {\\n    uint256 amountWithoutFee = exData.srcAmount;\\n    address wrapper = exData.offchainData.wrapper;\\n    bool offChainSwapSuccess;\\n\\n    uint256 destBalanceBefore = exData.destAddr.getBalance(address(this));\\n\\n    // Takes DFS exchange fee\\n    exData.srcAmount -= getFee(\\n        exData.srcAmount,\\n        exData.user,\\n        exData.srcAddr,\\n        exData.dfsFeeDivider\\n    );\\n\\n    // Try 0x first and then fallback on specific wrapper\\n    if (exData.offchainData.price > 0) {\\n        (offChainSwapSuccess, ) = offChainSwap(exData, ExchangeActionType.SELL);\\n    }\\n\\n    // fallback to desired wrapper if 0x failed\\n    if (!offChainSwapSuccess) {\\n        onChainSwap(exData, ExchangeActionType.SELL);\\n        wrapper = exData.wrapper;\\n    }\\n\\n    uint256 destBalanceAfter = exData.destAddr.getBalance(address(this));\\n    uint256 amountBought = sub(destBalanceAfter, destBalanceBefore);\\n\\n    // check slippage\\n    require(amountBought >= wmul(exData.minPrice, exData.srcAmount), ERR\\_SLIPPAGE\\_HIT);\\n\\n    // revert back exData changes to keep it consistent\\n    exData.srcAmount = amountWithoutFee;\\n\\n    return (wrapper, amountBought);\\n}\\n```\\n\\n```\\nfunction \\_buy(ExchangeData memory exData) internal returns (address, uint256) {\\n    require(exData.destAmount != 0, ERR\\_DEST\\_AMOUNT\\_MISSING);\\n\\n    uint256 amountWithoutFee = exData.srcAmount;\\n    address wrapper = exData.offchainData.wrapper;\\n    bool offChainSwapSuccess;\\n\\n    uint256 destBalanceBefore = exData.destAddr.getBalance(address(this));\\n\\n    // Takes DFS exchange fee\\n    exData.srcAmount -= getFee(\\n        exData.srcAmount,\\n        exData.user,\\n        exData.srcAddr,\\n        exData.dfsFeeDivider\\n    );\\n\\n    // Try 0x first and then fallback on specific wrapper\\n    if (exData.offchainData.price > 0) {\\n        (offChainSwapSuccess, ) = offChainSwap(exData, ExchangeActionType.BUY);\\n    }\\n\\n    // fallback to desired wrapper if 0x failed\\n    if (!offChainSwapSuccess) {\\n        onChainSwap(exData, ExchangeActionType.BUY);\\n        wrapper = exData.wrapper;\\n    }\\n\\n    uint256 destBalanceAfter = exData.destAddr.getBalance(address(this));\\n    uint256 amountBought = sub(destBalanceAfter, destBalanceBefore);\\n\\n    // check slippage\\n    require(amountBought >= exData.destAmount, ERR\\_SLIPPAGE\\_HIT);\\n\\n    // revert back exData changes to keep it consistent\\n    exData.srcAmount = amountWithoutFee;\\n\\n    return (wrapper, amountBought);\\n}\\n```\\n
The return value can be used for verification of the swap or used in the event data.
```\\nfunction \\_sell(ExchangeData memory exData) internal returns (address, uint256) {\\n    uint256 amountWithoutFee = exData.srcAmount;\\n    address wrapper = exData.offchainData.wrapper;\\n    bool offChainSwapSuccess;\\n\\n    uint256 destBalanceBefore = exData.destAddr.getBalance(address(this));\\n\\n    // Takes DFS exchange fee\\n    exData.srcAmount -= getFee(\\n        exData.srcAmount,\\n        exData.user,\\n        exData.srcAddr,\\n        exData.dfsFeeDivider\\n    );\\n\\n    // Try 0x first and then fallback on specific wrapper\\n    if (exData.offchainData.price > 0) {\\n        (offChainSwapSuccess, ) = offChainSwap(exData, ExchangeActionType.SELL);\\n    }\\n\\n    // fallback to desired wrapper if 0x failed\\n    if (!offChainSwapSuccess) {\\n        onChainSwap(exData, ExchangeActionType.SELL);\\n        wrapper = exData.wrapper;\\n    }\\n\\n    uint256 destBalanceAfter = exData.destAddr.getBalance(address(this));\\n    uint256 amountBought = sub(destBalanceAfter, destBalanceBefore);\\n\\n    // check slippage\\n    require(amountBought >= wmul(exData.minPrice, exData.srcAmount), ERR\\_SLIPPAGE\\_HIT);\\n\\n    // revert back exData changes to keep it consistent\\n    exData.srcAmount = amountWithoutFee;\\n\\n    return (wrapper, amountBought);\\n}\\n```\\n