Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph: in unlockMaturity, rename tokensLockedUntil to unlockBlock #63

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/adapters/GraphAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ contract GraphAdapter is Adapter {
Unlock memory unlock = $.unlocks[unlockID];
uint256 THAWING_PERIOD = GRAPH.thawingPeriod();
// if userEpoch == currentEpoch, it is yet to unlock
// => unlockTime + thawingPeriod
// => unlockBlock + thawingPeriod
// if userEpoch == currentEpoch - 1, it is processing
// => unlockTime
// => unlockBlock
// if userEpoch < currentEpoch - 1, it has been processed
// => 0
uint256 tokensLockedUntil = $.lastEpochUnlockedAt + THAWING_PERIOD;
uint256 unlockBlock = $.lastEpochUnlockedAt + THAWING_PERIOD;
if (unlock.epoch == $.currentEpoch) {
return THAWING_PERIOD + tokensLockedUntil;
return THAWING_PERIOD + unlockBlock;
} else if (unlock.epoch == $.currentEpoch - 1) {
return tokensLockedUntil;
return unlockBlock;
} else {
return 0;
}
Expand Down
Loading