Skip to content

Commit

Permalink
fix: removing the revert and associated error (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
RonTuretzky authored Jun 28, 2024
1 parent 92001af commit ed9d3d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/YieldDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ contract YieldDistributor is OwnableUpgradeable {
error IncorrectNumberOfProjects();
// @notice The error emitted when attempting to instantiate a variable with a zero value
error MustBeGreaterThanZero();
// @notice The error emitted when a voter has never held $BREAD before
error NoCheckpointsForAccount();
// @notice The error emitted when attempting to add or remove a project that is already queued for addition or removal
error ProjectAlreadyQueued();
// @notice The error emitted when attempting to remove a project that is not in the `projects` array
Expand Down Expand Up @@ -139,7 +137,7 @@ contract YieldDistributor is OwnableUpgradeable {

// Initialized as the checkpoint count, but later used to track checkpoint index
uint32 _currentCheckpointIndex = BREAD.numCheckpoints(_account);
if (_currentCheckpointIndex == 0) revert NoCheckpointsForAccount();
if (_currentCheckpointIndex == 0) return 0;

// No voting power if the first checkpoint is after the end of the interval
Checkpoints.Checkpoint208 memory _currentCheckpoint = BREAD.checkpoints(_account, 0);
Expand Down

0 comments on commit ed9d3d3

Please sign in to comment.