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

baskets: credit types are not checked in allowed classes #925

Closed
4 tasks
Tracked by #818
technicallyty opened this issue Mar 23, 2022 · 1 comment · Fixed by #935
Closed
4 tasks
Tracked by #818

baskets: credit types are not checked in allowed classes #925

technicallyty opened this issue Mar 23, 2022 · 1 comment · Fixed by #935
Assignees
Labels
Scope: x/ecocredit Issues that update the x/ecocredit module Type: Bug Something isn't working

Comments

@technicallyty
Copy link
Contributor

technicallyty commented Mar 23, 2022

Summary of Bug

in the Create method for the basket submodule, we have allowed_classes, and credit_type_abbreviation as some of the basket creation criteria. However, we never actually check if the classes in allowed_classes have the same type specified in credit_type_abbreviation.

This isn't chain-breaking, but it could allow some wonky/bogus baskets to be created. The Put method will still make sure credits being placed in the basket adhere to the credit type AND is one of the allowed classes.

Version

https://github.com/regen-network/regen-ledger/tree/release/v3.0.x and current master branch 88a4b31 (latest commit)

Steps to Reproduce

  1. create a basket with any credit type, and pass in class Id's that do not adhere to that credit type
  2. basket creation succeeds

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@technicallyty technicallyty added Type: Bug Something isn't working good first issue Good for newcomers Scope: x/ecocredit Issues that update the x/ecocredit module labels Mar 23, 2022
@robert-zaremba robert-zaremba self-assigned this Mar 24, 2022
@ryanchristo ryanchristo added this to the v4.0 - Llangorse Upgrade milestone Mar 24, 2022
@ryanchristo ryanchristo removed the good first issue Good for newcomers label Mar 26, 2022
@technicallyty
Copy link
Contributor Author

@robert-zaremba have you started on this? i can have this done in #935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: x/ecocredit Issues that update the x/ecocredit module Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants