Skip to content

Commit

Permalink
fix(grants): updated grants impact data
Browse files Browse the repository at this point in the history
  • Loading branch information
AndySakov committed Nov 5, 2024
1 parent 8c8837a commit 2c56ae8
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/grants/grants.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,17 +295,23 @@ export class GrantsService implements OnModuleInit, OnModuleDestroy {
`,
);

const programs = result.records.map(
record => record.get("program") as KarmaGapGrantProgram,
);
const programs = result.records
.map(record => record.get("program") as KarmaGapGrantProgram)
.filter(x => {
if (status === "active") {
return (x.status ?? "Inactive") === "Active";
} else if (status === "inactive") {
return Object.keys(KARMAGAP_PROGRAM_MAPPINGS).includes(
`${x.programId}`,
);
} else {
return true;
}
});

this.logger.log(`Found ${programs.length} programs`);

return programs.filter(x =>
status
? (x.status ?? "Inactive").toLowerCase() === status.toLowerCase()
: true,
);
return programs;
};

getGrantBySlug = async (
Expand Down
148 changes: 148 additions & 0 deletions src/shared/constants/daoip-karmagap-program-mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,152 @@ export const KARMAGAP_PROGRAM_MAPPINGS: {
from_funder_name: "clrfund",
grant_pool_name: "round_9",
},
"544": {
from_funder_name: "octant-golemfoundation",
grant_pool_name: "epoch_1",
},
"545": {
from_funder_name: "octant-golemfoundation",
grant_pool_name: "epoch_2",
},
"546": {
from_funder_name: "octant-golemfoundation",
grant_pool_name: "epoch_3",
},
"683": {
from_funder_name: "optimism",
grant_pool_name: "retropgf2",
},
"682": {
from_funder_name: "optimism",
grant_pool_name: "retropgf3",
},
"681": {
from_funder_name: "optimism",
grant_pool_name: "retrofunding4",
},
"680": {
from_funder_name: "optimism",
grant_pool_name: "retrofunding5",
},
"420": {
from_funder_name: "optimism",
grant_pool_name: "missions_season_4",
},
"716": {
from_funder_name: "stellar",
grant_pool_name: "scf-1",
},
"717": {
from_funder_name: "stellar",
grant_pool_name: "scf-2",
},
"718": {
from_funder_name: "stellar",
grant_pool_name: "scf-3",
},
"719": {
from_funder_name: "stellar",
grant_pool_name: "scf-4",
},
"720": {
from_funder_name: "stellar",
grant_pool_name: "scf-5",
},
"721": {
from_funder_name: "stellar",
grant_pool_name: "scf-6",
},
"722": {
from_funder_name: "stellar",
grant_pool_name: "scf-7",
},
"723": {
from_funder_name: "stellar",
grant_pool_name: "scf-8",
},
"724": {
from_funder_name: "stellar",
grant_pool_name: "scf-9",
},
"725": {
from_funder_name: "stellar",
grant_pool_name: "scf-10",
},
"726": {
from_funder_name: "stellar",
grant_pool_name: "scf-11",
},
"727": {
from_funder_name: "stellar",
grant_pool_name: "scf-12",
},
"728": {
from_funder_name: "stellar",
grant_pool_name: "scf-13",
},
"729": {
from_funder_name: "stellar",
grant_pool_name: "scf-14",
},
"730": {
from_funder_name: "stellar",
grant_pool_name: "scf-15",
},
"731": {
from_funder_name: "stellar",
grant_pool_name: "scf-16",
},
"732": {
from_funder_name: "stellar",
grant_pool_name: "scf-17",
},
"733": {
from_funder_name: "stellar",
grant_pool_name: "scf-18",
},
"734": {
from_funder_name: "stellar",
grant_pool_name: "scf-19",
},
"735": {
from_funder_name: "stellar",
grant_pool_name: "scf-20",
},
"736": {
from_funder_name: "stellar",
grant_pool_name: "scf-21",
},
"737": {
from_funder_name: "stellar",
grant_pool_name: "scf-22",
},
"738": {
from_funder_name: "stellar",
grant_pool_name: "scf-23",
},
"739": {
from_funder_name: "stellar",
grant_pool_name: "scf-24",
},
"740": {
from_funder_name: "stellar",
grant_pool_name: "scf-25",
},
"741": {
from_funder_name: "stellar",
grant_pool_name: "scf-26",
},
"742": {
from_funder_name: "stellar",
grant_pool_name: "scf-27",
},
"743": {
from_funder_name: "stellar",
grant_pool_name: "scf-28",
},
"744": {
from_funder_name: "stellar",
grant_pool_name: "scf-29",
},
};

0 comments on commit 2c56ae8

Please sign in to comment.