Skip to content

Commit

Permalink
feat(app, platforms): removes grantee statistics from gitcoin stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulaic-labs authored Aug 16, 2023
2 parents c96e44d + 0ce2f0a commit f1068ee
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 152 deletions.
32 changes: 0 additions & 32 deletions app/__test-fixtures__/contextTestHelpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,38 +125,6 @@ export const makeTestCeramicContext = (initialState?: Partial<CeramicContextStat
providerSpec: getProviderSpec("Gitcoin", "GitcoinContributorStatistics#numGr14ContributionsGte#1"),
stamp: undefined,
},
"GitcoinGranteeStatistics#numOwnedGrants#1": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#numOwnedGrants#1"),
stamp: undefined,
},
"GitcoinGranteeStatistics#numGrantContributors#10": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#numGrantContributors#10"),
stamp: undefined,
},
"GitcoinGranteeStatistics#numGrantContributors#25": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#numGrantContributors#25"),
stamp: undefined,
},
"GitcoinGranteeStatistics#numGrantContributors#100": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#numGrantContributors#100"),
stamp: undefined,
},
"GitcoinGranteeStatistics#totalContributionAmount#100": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#totalContributionAmount#100"),
stamp: undefined,
},
"GitcoinGranteeStatistics#totalContributionAmount#1000": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#totalContributionAmount#1000"),
stamp: undefined,
},
"GitcoinGranteeStatistics#totalContributionAmount#10000": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#totalContributionAmount#10000"),
stamp: undefined,
},
"GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1": {
providerSpec: getProviderSpec("Gitcoin", "GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1"),
stamp: undefined,
},
Coinbase: {
providerSpec: getProviderSpec("Coinbase", "Coinbase"),
stamp: undefined,
Expand Down
8 changes: 0 additions & 8 deletions app/__tests__/components/ExpiredStampModal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ describe("ExpiredStampModal", () => {
"GitcoinContributorStatistics#totalContributionAmountGte#1000",
"GitcoinContributorStatistics#numGr14ContributionsGte#1",
"GitcoinContributorStatistics#numRoundsContributedToGte#1",
"GitcoinGranteeStatistics#numOwnedGrants#1",
"GitcoinGranteeStatistics#numGrantContributors#10",
"GitcoinGranteeStatistics#numGrantContributors#25",
"GitcoinGranteeStatistics#numGrantContributors#100",
"GitcoinGranteeStatistics#totalContributionAmount#100",
"GitcoinGranteeStatistics#totalContributionAmount#1000",
"GitcoinGranteeStatistics#totalContributionAmount#10000",
"GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1",
]);
});
it("should delete all stamps within each expired platform", async () => {
Expand Down
72 changes: 1 addition & 71 deletions platforms/src/Gitcoin/Providers-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PlatformSpec, PlatformGroupSpec, Provider } from "../types";
import { GitcoinContributorStatisticsProvider, GitcoinGranteeStatisticsProvider } from "./Providers";
import { GitcoinContributorStatisticsProvider } from "./Providers";

export const PlatformDetails: PlatformSpec = {
icon: "./assets/gtcGrantsLightIcon.svg",
Expand Down Expand Up @@ -35,35 +35,6 @@ export const ProviderConfig: PlatformGroupSpec[] = [
{ title: "at least 1 Round", name: "GitcoinContributorStatistics#numRoundsContributedToGte#1" },
],
},
{
platformGroup: "Owner of...",
providers: [{ title: " at least 1 Grant", name: "GitcoinGranteeStatistics#numOwnedGrants#1" }],
},
{
platformGroup: "Grants have at least...",
providers: [
{ title: "10 Contributors", name: "GitcoinGranteeStatistics#numGrantContributors#10" },
{ title: "25 Contributors", name: "GitcoinGranteeStatistics#numGrantContributors#25" },
{ title: "100 Contributors", name: "GitcoinGranteeStatistics#numGrantContributors#100" },
],
},
{
platformGroup: "Grants have received...",
providers: [
{ title: "at least $100", name: "GitcoinGranteeStatistics#totalContributionAmount#100" },
{ title: "at least $1000", name: "GitcoinGranteeStatistics#totalContributionAmount#1000" },
{ title: "at least $10000", name: "GitcoinGranteeStatistics#totalContributionAmount#10000" },
],
},
{
platformGroup: "Eco/Cause Rounds",
providers: [
{
title: "owner of at least 1 Grant in Eco/Cause Rounds",
name: "GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1",
},
],
},
];

export const providers: Provider[] = [
Expand Down Expand Up @@ -113,45 +84,4 @@ export const providers: Provider[] = [
receivingAttribute: "num_gr14_contributions",
recordAttribute: "numGr14ContributionsGte",
}),
// --- GitcoinGranteeStatisticsProvider ---
new GitcoinGranteeStatisticsProvider({
threshold: 1,
receivingAttribute: "num_owned_grants",
recordAttribute: "numOwnedGrants",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 10,
receivingAttribute: "num_grant_contributors",
recordAttribute: "numGrantContributors",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 25,
receivingAttribute: "num_grant_contributors",
recordAttribute: "numGrantContributors",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 100,
receivingAttribute: "num_grant_contributors",
recordAttribute: "numGrantContributors",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 100,
receivingAttribute: "total_contribution_amount",
recordAttribute: "totalContributionAmount",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 1000,
receivingAttribute: "total_contribution_amount",
recordAttribute: "totalContributionAmount",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 10000,
receivingAttribute: "total_contribution_amount",
recordAttribute: "totalContributionAmount",
}),
new GitcoinGranteeStatisticsProvider({
threshold: 1,
receivingAttribute: "num_grants_in_eco_and_cause_rounds",
recordAttribute: "numGrantsInEcoAndCauseRound",
}),
];

This file was deleted.

12 changes: 0 additions & 12 deletions platforms/src/Gitcoin/Providers/gitcoinGrantsGranteeStatistics.ts

This file was deleted.

1 change: 0 additions & 1 deletion platforms/src/Gitcoin/Providers/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/* eslint-disable */
export { GitcoinContributorStatisticsProvider } from "./gitcoinGrantsContributorStatistics";
export { GitcoinGranteeStatisticsProvider } from "./gitcoinGrantsGranteeStatistics";
2 changes: 1 addition & 1 deletion platforms/src/Gitcoin/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { GitcoinPlatform } from "./App-Bindings";
export { ProviderConfig, PlatformDetails, providers } from "./Providers-config";
export { GitcoinContributorStatisticsProvider, GitcoinGranteeStatisticsProvider } from "./Providers";
export { GitcoinContributorStatisticsProvider } from "./Providers";
8 changes: 0 additions & 8 deletions types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,6 @@ export type PROVIDER_ID =
| "GitcoinContributorStatistics#totalContributionAmountGte#1000"
| "GitcoinContributorStatistics#numRoundsContributedToGte#1"
| "GitcoinContributorStatistics#numGr14ContributionsGte#1"
| "GitcoinGranteeStatistics#numOwnedGrants#1"
| "GitcoinGranteeStatistics#numGrantContributors#10"
| "GitcoinGranteeStatistics#numGrantContributors#25"
| "GitcoinGranteeStatistics#numGrantContributors#100"
| "GitcoinGranteeStatistics#totalContributionAmount#100"
| "GitcoinGranteeStatistics#totalContributionAmount#1000"
| "GitcoinGranteeStatistics#totalContributionAmount#10000"
| "GitcoinGranteeStatistics#numGrantsInEcoAndCauseRound#1"
| "Linkedin"
| "Discord"
| "Snapshot"
Expand Down

0 comments on commit f1068ee

Please sign in to comment.