Skip to content

Commit

Permalink
chore: use anchor address of project at the time of applying (#3376)
Browse files Browse the repository at this point in the history
* chore: use anchor address of project at the time of applying
instead of the latest anchor address

* reintroduce project explor
  • Loading branch information
thelostone-mc authored Apr 26, 2024
1 parent a67679e commit bf0e0c5
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packages/data-layer/src/data-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ export class DataLayer {
}
) {
id
anchorAddress
chainId
roundId
projectId
Expand Down Expand Up @@ -478,7 +479,7 @@ export class DataLayer {
contributorCount: a.uniqueDonorsCount,
contributionsTotalUsd: a.totalAmountDonatedInUsd,
tags: a.round.tags,
anchorAddress: a.project.anchorAddress,
anchorAddress: a.anchorAddress,
};
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/data-layer/src/data.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ export type Application = {
totalAmountDonatedInUsd: number;
totalDonationsCount: string;
uniqueDonorsCount: number;
anchorAddress?: string;
round: {
strategyName: RoundPayoutType;
donationsStartTime: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export function ApplicationSummaryFromJSONTyped(
createdAtBlock: json["createdAtBlock"],
contributorCount: json["contributorCount"],
contributionsTotalUsd: json["contributionsTotalUsd"],
anchorAddress: json["anchorAddress"],
};
}

Expand Down Expand Up @@ -199,5 +200,6 @@ export function ApplicationSummaryToJSON(
createdAtBlock: value.createdAtBlock,
contributorCount: value.contributorCount,
contributionsTotalUsd: value.contributionsTotalUsd,
anchorAddress: value.anchorAddress,
};
}
2 changes: 2 additions & 0 deletions packages/data-layer/src/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export const getApplication = gql`
totalAmountDonatedInUsd
uniqueDonorsCount
totalDonationsCount
anchorAddress
round {
strategyName
donationsStartTime
Expand Down Expand Up @@ -295,6 +296,7 @@ export const getApplicationsForExplorer = gql`
totalAmountDonatedInUsd
uniqueDonorsCount
totalDonationsCount
anchorAddress
round {
strategyName
donationsStartTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ export function ExploreProjectsPage(): JSX.Element {
collection
? ""
: isLoading
? "Loading..."
: `${pageTitle} (${totalApplicationsCount})`
? "Loading..."
: `${pageTitle} (${totalApplicationsCount})`
}
action={
collection && (
<div className="font-mono flex gap-x-4">
{/* <form
<form
className="relative"
onSubmit={onSearchSubmit}
onBlur={onSearchSubmit}
Expand Down Expand Up @@ -232,7 +232,7 @@ export function ExploreProjectsPage(): JSX.Element {
options={FILTER_OPTIONS}
/>
</div>
)} */}
)}
</div>
)
}
Expand Down
12 changes: 6 additions & 6 deletions packages/grant-explorer/src/features/discovery/LandingTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export default function LandingTabs() {
children: isDesktop ? "Explore rounds" : "Rounds",
tabName: "home-rounds-tab",
},
// {
// to: "/projects",
// activeRegExp: /^\/projects/,
// children: isDesktop ? "Explore projects" : "Projects",
// tabName: "home-projects-tab",
// },
{
to: "/projects",
activeRegExp: /^\/projects/,
children: isDesktop ? "Explore projects" : "Projects",
tabName: "home-projects-tab",
},
];

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function mapApplicationToProject(application: Application): Project {
projectMetadata: application.project.metadata,
status: application.status,
grantApplicationFormAnswers: application.metadata.application.answers ?? [],
anchorAddress: application.project.anchorAddress,
anchorAddress: application.anchorAddress,
};
}

Expand Down

0 comments on commit bf0e0c5

Please sign in to comment.