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

[digital-carbon] Clean up cco2 handler logic #189

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ typings/
# thegraph generated
**/generated/

# .bin files in tests
**/tests/**/.bin/

# env files
.env.local

Expand Down
8 changes: 2 additions & 6 deletions polygon-digital-carbon/src/RetirementHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,8 @@ export function saveCCO2Retirement(event: burnedCO2Token): void {

// Set up project/default info for Coorest "project"

if (credit.vintage == 1970) {
credit.project = 'CCO2'
credit.save()

loadOrCreateCarbonProject('CCS', 'CCO2')
}
let project = loadOrCreateCarbonProject('CCS', 'CCO2')
credit.project = project.id

credit.retired = credit.retired.plus(event.params.amount)
credit.save()
Expand Down
Binary file not shown.
Binary file not shown.
Loading