-
Notifications
You must be signed in to change notification settings - Fork 43
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
change undistributed rewards code #971
Conversation
Coverage SummaryTotals
FilesExpand
|
Contract comparison - from 94d6506 to 64319c1
|
end_week: Week, | ||
dest_address: ManagedAddress, | ||
) { | ||
let collect_rewards_offset = USER_MAX_CLAIM_WEEKS + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use an offset? Why not claiming all the rewards from start_week
to end_week
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was like this in the initial implementation and I kept it. It makes sense: Users can claim boosted rewards for the past 4 weeks anytime, so you should only collect rewards from 5 weeks onward.
let caller = self.blockchain().get_caller(); | ||
require!( | ||
self.unlocked_token_transfer_whitelist().contains(&caller), | ||
"May not call this endpoint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a more descriptive error msg like Not authorized to call this endpoint.
No description provided.