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

fix: POAP - Ensures that all tokens are considered and not just the token with the lowest ID #8994

Merged
merged 2 commits into from
Jun 7, 2021

Conversation

gdixon
Copy link
Contributor

@gdixon gdixon commented Jun 3, 2021

Description

This PR corrects the logic for POAP verifications.

The old logic made the assumption that the token with the lowest ID was transferred earliest, according to this report - the earliest transfer might not always have the lowest ID. This could be because the tokens were minted earlier and then transferred to the user, or it could be down to the order that the tokens were transferred from xDai to mainnet. Either way, this PR alters the logic so that:

  • each token's most recent transfer is recorded into a list
  • that list is sorted
  • the earliest transfer is selected from all tokens held
Refers/Fixes

fixes: #8979

Testing

Tested locally against the address provided in slack

@thelostone-mc thelostone-mc changed the base branch from stable to master June 7, 2021 09:09
@thelostone-mc thelostone-mc changed the base branch from master to stable June 7, 2021 09:10
@thelostone-mc thelostone-mc changed the base branch from stable to master June 7, 2021 09:11
@thelostone-mc thelostone-mc merged commit 414bc15 into master Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: The age of POAPs are being incorrectly verified
2 participants