fix: Bring back receiver address zero check
Add small docs and rename variables --- don't change below this line --- ENG-4314 Took 1 hour 39 minutes
This commit is contained in:
@@ -411,6 +411,9 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
|
||||
address receiver,
|
||||
bytes calldata swaps
|
||||
) internal returns (uint256 amountOut) {
|
||||
if (receiver == address(0)) {
|
||||
revert TychoRouter__AddressZero();
|
||||
}
|
||||
if (minAmountOut == 0) {
|
||||
revert TychoRouter__UndefinedMinAmountOut();
|
||||
}
|
||||
@@ -462,6 +465,9 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
|
||||
address receiver,
|
||||
bytes calldata swap_
|
||||
) internal returns (uint256 amountOut) {
|
||||
if (receiver == address(0)) {
|
||||
revert TychoRouter__AddressZero();
|
||||
}
|
||||
if (minAmountOut == 0) {
|
||||
revert TychoRouter__UndefinedMinAmountOut();
|
||||
}
|
||||
@@ -516,6 +522,9 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
|
||||
address receiver,
|
||||
bytes calldata swaps
|
||||
) internal returns (uint256 amountOut) {
|
||||
if (receiver == address(0)) {
|
||||
revert TychoRouter__AddressZero();
|
||||
}
|
||||
if (minAmountOut == 0) {
|
||||
revert TychoRouter__UndefinedMinAmountOut();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user