diff --git a/src/grants/grants.service.ts b/src/grants/grants.service.ts index e781eaf7..435691a6 100644 --- a/src/grants/grants.service.ts +++ b/src/grants/grants.service.ts @@ -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 ( diff --git a/src/shared/constants/daoip-karmagap-program-mappings.ts b/src/shared/constants/daoip-karmagap-program-mappings.ts index 011f50bf..ee1e393e 100644 --- a/src/shared/constants/daoip-karmagap-program-mappings.ts +++ b/src/shared/constants/daoip-karmagap-program-mappings.ts @@ -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", + }, };