Description: The codebase under review has solid unit test coverage but has certain areas of code not tested, and it would be nice to have them added to the test suite. The uncovered lines include,
L107 and #L456, where the revert case is not tested.
if (!success) revert NativeAssetTransferFailed();
L500, where the current allowance is greater than the case, is not tested, and in #L502, the current allowance equals 0 case as well.
if (currentAllowance < fromAmount) {
// check if is non-zero, set to 0 if not
if (currentAllowance != 0) sendingAsset.safeApprove(approveTo, 0);
...
L539 and #L542, where the negative case is not tested when nativeBalance is zero and the send call is a failing case.
Context: GenericSwapFacetV3.sol#L456, GenericSwapFacetV3.sol#L107, GenericSwapFacetV3.sol#L500, GenericSwapFacetV3.sol#L502, GenericSwapFacetV3.sol#L539, GenericSwapFacetV3.sol#L542
Description: The codebase under review has solid unit test coverage but has certain areas of code not tested, and it would be nice to have them added to the test suite. The uncovered lines include,
L107 and #L456, where the revert case is not tested.
L500, where the current allowance is greater than the case, is not tested, and in #L502, the current allowance equals 0 case as well.
L539 and #L542, where the negative case is not tested when nativeBalance is zero and the send call is a failing case.
Recommendation: Consider adding tests for the above branches to improve the code coverage.
LI.FI:
Researcher: