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

NFT1155 Credits are not burned correctly when there are multiple mintings #507

Open
aaitor opened this issue Sep 28, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@aaitor
Copy link
Member

aaitor commented Sep 28, 2023

Describe the bug

When there is a scenario with multiple mints, the contract NFT1155SubscriptionUpgradeable.sol don't burn the credits correctly.

To Reproduce

Steps to reproduce the behavior:

  1. Mint a DID with 10 editions expiring in 15 blocks - correct
  2. Burn 2 editions so the balance should be 10 -2 = 8 - correct
  3. Make the remaining editions to expire (mining 15 blocks) - correct
  4. The balance should be 0 now - correct
  5. Mint 20 editions expiring in 15 blocks - correct
  6. The balance should be 0 + 20 = 20 - correct
  7. Burn 2 editions, the balance should be 20 - 2 = 18 - error, the balance is 20

The error is because the tokens burned are from the already expired subscription

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@aaitor aaitor added the bug Something isn't working label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant