fix: Remove amountReceived and dataOffset from the callback verification
--- don't change below this line --- ENG-4047 Took 20 minutes
This commit is contained in:
@@ -50,12 +50,7 @@ contract CallbackVerificationDispatcher {
|
||||
function _callVerifyCallback(bytes calldata data)
|
||||
internal
|
||||
view
|
||||
returns (
|
||||
uint256 amountOwed,
|
||||
uint256 amountReceived,
|
||||
address tokenOwed,
|
||||
uint16 dataOffset
|
||||
)
|
||||
returns (uint256 amountOwed, address tokenOwed)
|
||||
{
|
||||
address verifier;
|
||||
bytes4 decodedSelector;
|
||||
@@ -87,8 +82,7 @@ contract CallbackVerificationDispatcher {
|
||||
}
|
||||
}
|
||||
|
||||
(amountOwed, amountReceived, tokenOwed, dataOffset) =
|
||||
abi.decode(result, (uint256, uint256, address, uint16));
|
||||
(amountOwed, tokenOwed) = abi.decode(result, (uint256, address));
|
||||
}
|
||||
|
||||
// slither-disable-next-line dead-code
|
||||
|
||||
@@ -87,12 +87,7 @@ contract TychoRouter is
|
||||
* @param msgData encoded data. It must includes data for the verification.
|
||||
*/
|
||||
function _executeGenericCallback(bytes calldata msgData) internal {
|
||||
(
|
||||
uint256 amountOwed,
|
||||
uint256 amountReceived,
|
||||
address tokenOwed,
|
||||
uint16 offset // I think we actually don't need this!
|
||||
) = _callVerifyCallback(msgData);
|
||||
(uint256 amountOwed, address tokenOwed) = _callVerifyCallback(msgData);
|
||||
|
||||
IERC20(tokenOwed).safeTransfer(msg.sender, amountOwed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user