From 3ead64fedd04e0f20247519c1760c8f4688f1476 Mon Sep 17 00:00:00 2001
From: MasterHW <43460021+MasterHW@users.noreply.github.com>
Date: Fri, 26 Apr 2024 02:19:04 -0400
Subject: [PATCH 1/3] make projectstats panel collapse on mobile (#3369)
---
.../grant-explorer/src/features/round/ViewProjectDetails.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx b/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx
index 5fa6062139..f0f5fb65d1 100644
--- a/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx
+++ b/packages/grant-explorer/src/features/round/ViewProjectDetails.tsx
@@ -550,7 +550,7 @@ export function ProjectStats() {
(isInfiniteDate(round.roundEndTime) || round.roundEndTime > new Date());
return (
-
+
Date: Fri, 26 Apr 2024 14:46:36 +0800
Subject: [PATCH 2/3] remove wait forindexer in donation (#3377)
---
packages/common/src/allo/backends/allo-v2.ts | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/packages/common/src/allo/backends/allo-v2.ts b/packages/common/src/allo/backends/allo-v2.ts
index 399f9a680f..1f9603081e 100644
--- a/packages/common/src/allo/backends/allo-v2.ts
+++ b/packages/common/src/allo/backends/allo-v2.ts
@@ -198,10 +198,6 @@ export class AlloV2 implements Allo {
60_000,
publicClient
);
- await this.waitUntilIndexerSynced({
- chainId: this.chainId,
- blockNumber: receipt.blockNumber,
- });
return receipt;
} else {
throw tx.error;
@@ -696,13 +692,11 @@ export class AlloV2 implements Allo {
throw new AlloError("DirectGrants is not supported yet!");
}
- const strategyInstance = new DonationVotingMerkleDistributionStrategy(
- {
- chain: this.chainId,
- poolId: BigInt(args.roundId),
- address: args.strategyAddress,
- }
- );
+ const strategyInstance = new DonationVotingMerkleDistributionStrategy({
+ chain: this.chainId,
+ poolId: BigInt(args.roundId),
+ address: args.strategyAddress,
+ });
const totalApplications = await strategyInstance.recipientsCounter();
From bf0e0c5e6d4c85c110641d28e8749b5bb1947acf Mon Sep 17 00:00:00 2001
From: Aditya Anand M C
Date: Fri, 26 Apr 2024 16:00:41 +0530
Subject: [PATCH 3/3] chore: use anchor address of project at the time of
applying (#3376)
* chore: use anchor address of project at the time of applying
instead of the latest anchor address
* reintroduce project explor
---
packages/data-layer/src/data-layer.ts | 3 ++-
packages/data-layer/src/data.types.ts | 1 +
.../models/ApplicationSummary.ts | 2 ++
packages/data-layer/src/queries.ts | 2 ++
.../src/features/discovery/ExploreProjectsPage.tsx | 8 ++++----
.../src/features/discovery/LandingTabs.tsx | 12 ++++++------
.../src/features/projects/hooks/useApplication.ts | 2 +-
7 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/packages/data-layer/src/data-layer.ts b/packages/data-layer/src/data-layer.ts
index db21172d4d..157ef8bb94 100644
--- a/packages/data-layer/src/data-layer.ts
+++ b/packages/data-layer/src/data-layer.ts
@@ -428,6 +428,7 @@ export class DataLayer {
}
) {
id
+ anchorAddress
chainId
roundId
projectId
@@ -478,7 +479,7 @@ export class DataLayer {
contributorCount: a.uniqueDonorsCount,
contributionsTotalUsd: a.totalAmountDonatedInUsd,
tags: a.round.tags,
- anchorAddress: a.project.anchorAddress,
+ anchorAddress: a.anchorAddress,
};
});
}
diff --git a/packages/data-layer/src/data.types.ts b/packages/data-layer/src/data.types.ts
index ec98eb4239..68fa9361cc 100644
--- a/packages/data-layer/src/data.types.ts
+++ b/packages/data-layer/src/data.types.ts
@@ -705,6 +705,7 @@ export type Application = {
totalAmountDonatedInUsd: number;
totalDonationsCount: string;
uniqueDonorsCount: number;
+ anchorAddress?: string;
round: {
strategyName: RoundPayoutType;
donationsStartTime: string;
diff --git a/packages/data-layer/src/openapi-search-client/models/ApplicationSummary.ts b/packages/data-layer/src/openapi-search-client/models/ApplicationSummary.ts
index b77b461bb2..eebbf5195c 100644
--- a/packages/data-layer/src/openapi-search-client/models/ApplicationSummary.ts
+++ b/packages/data-layer/src/openapi-search-client/models/ApplicationSummary.ts
@@ -171,6 +171,7 @@ export function ApplicationSummaryFromJSONTyped(
createdAtBlock: json["createdAtBlock"],
contributorCount: json["contributorCount"],
contributionsTotalUsd: json["contributionsTotalUsd"],
+ anchorAddress: json["anchorAddress"],
};
}
@@ -199,5 +200,6 @@ export function ApplicationSummaryToJSON(
createdAtBlock: value.createdAtBlock,
contributorCount: value.contributorCount,
contributionsTotalUsd: value.contributionsTotalUsd,
+ anchorAddress: value.anchorAddress,
};
}
diff --git a/packages/data-layer/src/queries.ts b/packages/data-layer/src/queries.ts
index d33b4fe1f9..2bc0d05833 100644
--- a/packages/data-layer/src/queries.ts
+++ b/packages/data-layer/src/queries.ts
@@ -261,6 +261,7 @@ export const getApplication = gql`
totalAmountDonatedInUsd
uniqueDonorsCount
totalDonationsCount
+ anchorAddress
round {
strategyName
donationsStartTime
@@ -295,6 +296,7 @@ export const getApplicationsForExplorer = gql`
totalAmountDonatedInUsd
uniqueDonorsCount
totalDonationsCount
+ anchorAddress
round {
strategyName
donationsStartTime
diff --git a/packages/grant-explorer/src/features/discovery/ExploreProjectsPage.tsx b/packages/grant-explorer/src/features/discovery/ExploreProjectsPage.tsx
index 8f0f9bf715..9f7d5db191 100644
--- a/packages/grant-explorer/src/features/discovery/ExploreProjectsPage.tsx
+++ b/packages/grant-explorer/src/features/discovery/ExploreProjectsPage.tsx
@@ -197,13 +197,13 @@ export function ExploreProjectsPage(): JSX.Element {
collection
? ""
: isLoading
- ? "Loading..."
- : `${pageTitle} (${totalApplicationsCount})`
+ ? "Loading..."
+ : `${pageTitle} (${totalApplicationsCount})`
}
action={
collection && (
- {/*
- )} */}
+ )}
)
}
diff --git a/packages/grant-explorer/src/features/discovery/LandingTabs.tsx b/packages/grant-explorer/src/features/discovery/LandingTabs.tsx
index a9b9344008..f9133d681c 100644
--- a/packages/grant-explorer/src/features/discovery/LandingTabs.tsx
+++ b/packages/grant-explorer/src/features/discovery/LandingTabs.tsx
@@ -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 (
diff --git a/packages/grant-explorer/src/features/projects/hooks/useApplication.ts b/packages/grant-explorer/src/features/projects/hooks/useApplication.ts
index b3cf3e1103..aebb51b6b4 100644
--- a/packages/grant-explorer/src/features/projects/hooks/useApplication.ts
+++ b/packages/grant-explorer/src/features/projects/hooks/useApplication.ts
@@ -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,
};
}