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 negative total shares and holders count #595

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

mendesfabio
Copy link
Member

@mendesfabio mendesfabio commented May 29, 2024

Description

#591 fixed a scope issue where Pool entity was not saved before being passed/instantiated to another functions. OOTH that fix exposed another issue as handleTransfer() not only substracts the pre-minted BPT from the Vault (that's just what we need) but also subtracts the value from pool.totalShares leading to negative shares. Instead of using the function, I'm simply subtracting the pre-minted BPTs from Vault's pool share directly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency changes
  • Code refactor / cleanup
  • Documentation or wording changes
  • Other

How should this be tested?

Please provide instructions so we can test. Please also list any relevant details for your test configuration.

  • Test A
  • Test B

Checklist:

  • I have performed a self-review of my own code
  • I have requested at least 1 review (If the PR is significant enough, use best judgement here)
  • I have commented my code where relevant, particularly in hard-to-understand areas

dev -> master

  • I have checked that all beta deployments have synced
  • I have checked that the earliest block in the polygon pruned deployment is block, date/time
    • The earliest block is more than 24 hours old
  • I have checked that core metrics are the same in the beta and production deployments

Merges to dev

  • I have checked that the graft base is not a pruned deployment

@mendesfabio mendesfabio changed the title fix preminted total shares fix negative total shares and holders count May 30, 2024
@mendesfabio mendesfabio marked this pull request as ready for review June 18, 2024 21:28
@mendesfabio mendesfabio merged commit fd884e6 into dev Jun 18, 2024
4 checks passed
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.

1 participant