Skip to content

Commit

Permalink
Removed revert for past effectiveDate lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
u-hubar committed Apr 17, 2024
1 parent fdab400 commit 731dc92
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions contracts/v2/storage/NodeOperatorFeesStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ contract NodeOperatorFeesStorage is Named, Versioned, HubDependent {
} else {
for (uint i; i < operatorFees[identityId].length; ) {
if (operatorFees[identityId][i].effectiveDate > timestamp) {
if (i == 0) revert("No previous fee applicable");
return operatorFees[identityId][i - 1];
return i == 0 ? operatorFees[identityId][0] : operatorFees[identityId][i - 1];
}

unchecked {
Expand Down

0 comments on commit 731dc92

Please sign in to comment.