feat: Explicitly handle the TransferType.NONE case
Took 8 minutes
This commit is contained in:
@@ -45,7 +45,9 @@ contract TokenTransfer {
|
|||||||
uint256 amount,
|
uint256 amount,
|
||||||
TransferType transferType
|
TransferType transferType
|
||||||
) internal {
|
) internal {
|
||||||
if (transferType == TransferType.TRANSFER_TO_PROTOCOL) {
|
if (transferType == TransferType.NONE) {
|
||||||
|
return;
|
||||||
|
} else if (transferType == TransferType.TRANSFER_TO_PROTOCOL) {
|
||||||
if (tokenIn == address(0)) {
|
if (tokenIn == address(0)) {
|
||||||
payable(receiver).transfer(amount);
|
payable(receiver).transfer(amount);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user