Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Move maturity check back to original line
Browse files Browse the repository at this point in the history
  • Loading branch information
stevieraykatz committed Oct 4, 2023
1 parent 8beb38a commit 6514c35
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ contract AccountsDepositWithdrawEndowments is
);
}

// Check if maturity has been reached for the endowment (0 == no maturity date)
bool mature = (tempEndowment.maturityTime != 0 &&
block.timestamp >= tempEndowment.maturityTime);

if (tempEndowment.endowType == LibAccounts.EndowmentType.Daf) {
require(
beneficiaryAddress == address(0),
Expand Down Expand Up @@ -307,10 +311,6 @@ contract AccountsDepositWithdrawEndowments is
);
}

// Check if maturity has been reached for the endowment (0 == no maturity date)
bool mature = (tempEndowment.maturityTime != 0 &&
block.timestamp >= tempEndowment.maturityTime);

for (uint256 t = 0; t < tokens.length; t++) {
// ensure balance of tokens can cover the requested withdraw amount
require(state.Balances[id][acctType][tokens[t].addr] >= tokens[t].amnt, "Insufficient Funds");
Expand Down

0 comments on commit 6514c35

Please sign in to comment.