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

Prune credit batch balance when no remaining balance #1889

Open
4 tasks
ryanchristo opened this issue Apr 17, 2023 · 0 comments
Open
4 tasks

Prune credit batch balance when no remaining balance #1889

ryanchristo opened this issue Apr 17, 2023 · 0 comments
Labels
Scope: x/ecocredit Issues that update the x/ecocredit module Status: Backlog Type: Fix

Comments

@ryanchristo
Copy link
Member

Summary

Reported by @CShear and @blushi in slack. When an account has no remaining credits for a given credit batch, an empty balance is returned. To prevent empty balances from being included in the response when querying all credit batch balances, the empty balance should be pruned from state and therefore not included in query response.

Problem Definition

If users no longer hold credits for a given credit batch, the credit batch still shows up in the response when querying balances.

Proposal

Remove credit batch balance for a given account when no tradable, escrowed, or retired credits.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
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 Status: Backlog Type: Fix
Projects
None yet
Development

No branches or pull requests

1 participant