diff --git a/contracts/core/accounts/facets/AccountsDepositWithdrawEndowments.sol b/contracts/core/accounts/facets/AccountsDepositWithdrawEndowments.sol index 653bba396..74635843a 100644 --- a/contracts/core/accounts/facets/AccountsDepositWithdrawEndowments.sol +++ b/contracts/core/accounts/facets/AccountsDepositWithdrawEndowments.sol @@ -17,8 +17,6 @@ import {IAccountsDepositWithdrawEndowments} from "../interfaces/IAccountsDeposit import {Utils} from "../../../lib/utils.sol"; import {IVault} from "../../vault/interfaces/IVault.sol"; -import "hardhat/console.sol"; - /** * @title AccountsDepositWithdrawEndowments * @notice This facet manages the deposits and withdrawals for accounts @@ -99,8 +97,6 @@ contract AccountsDepositWithdrawEndowments is AccountStorage.State storage state = LibAccounts.diamondStorage(); AccountStorage.Endowment storage tempEndowment = state.ENDOWMENTS[details.id]; - // is it possible to have tokenAddress == address(0) - require(tokenAddress != address(0), "Invalid ERC20 token"); require(details.lockedPercentage + details.liquidPercentage == 100, "InvalidSplit"); RegistrarStorage.Config memory registrar_config = IRegistrar(state.config.registrarContract) @@ -112,7 +108,6 @@ contract AccountsDepositWithdrawEndowments is ); amount = amount.sub(depositFeeAmount); - require( IERC20(tokenAddress).transfer(tempEndowment.depositFee.payoutAddress, depositFeeAmount), "Transfer Failed" @@ -292,7 +287,6 @@ contract AccountsDepositWithdrawEndowments is } // ensure balance of tokens can cover the requested withdraw amount - // SHOULDN'T IT BE >= ? require(current_bal > tokens[t].amnt, "InsufficientFunds"); // calculate AP Protocol fee owed on withdrawn token amount diff --git a/contracts/test/DummyWMatic.sol b/contracts/test/DummyWMatic.sol index 145460c3a..424a77021 100644 --- a/contracts/test/DummyWMatic.sol +++ b/contracts/test/DummyWMatic.sol @@ -2,6 +2,9 @@ // author: @misicnenad pragma solidity ^0.8.0; +/** + * Inspired by the official testnet WMATIC code https://mumbai.polygonscan.com/address/0x9c3c9283d3e44854697cd22d3faa240cfb032889#code + */ contract DummyWMATIC { string public name = "Dummy Wrapped Matic"; string public symbol = "DWMATIC";