-
Notifications
You must be signed in to change notification settings - Fork 9
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: batch balances which didn't always correspond to batches on portfolio ecocredits table #1979
Conversation
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to find the mnemonic for the test account mentioned in how to test but I did find the mnemonics for a couple other test accounts and sent some credits from one of those accounts to the other to manually test. Unfortunately it looks like there is another issue related to how regen ledger updates balances that were previously a decimal value.
{
"address": "regen1m0qh5y4ejkz3l5n6jlrntxcqx9r0x9xjv4vpcp",
"batch_denom": "C22-001-20190116-20200116-030",
"tradable_amount": "0.000",
"retired_amount": "0",
"escrowed_amount": "0"
},
This still shows up in the deploy preview given 0.000
is not 0
and therefore not filtered. This would be solved on the ledger by pruning the balance (i.e. regen-network/regen-ledger#1889). Not sure how we want to handle this in the meantime but seems like we might need to update the filters to account for zeros being included after the decimal point.
Nice catch, I wasn't aware of the different formats! Are we always expecting 3 decimals or none? or it could also be in between, like "0.0" or "0.00" for instance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
Description
Closes: #1950
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
How to test
Use our testing account regen1df675r9vnf7pdedn4sf26svdsem3ugavgxmy46
Go to https://dev.app.regen.network/ecocredits/portfolio, on the ecocredits table last page (), you should see you have some tradable credits for C01-001-20170607-20220622-022, while your tradable balance for this batch is 0: http://redwood.regen.network:1317/regen/ecocredit/v1/balances/regen1df675r9vnf7pdedn4sf26svdsem3ugavgxmy46
Go to https://deploy-preview-1979--regen-registry.netlify.app/ecocredits/portfolio, you shouldn't see any row for C01-001-20170607-20220622-022 anymore.
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...