Skip to content

ensure index is not overwritten #3754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/builder/src/utils/roundApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export const parseRoundApplicationMetadata = (
};
}

// const [major, minor, patch] = object.version.split(".").map(Number);
//
metadata.applicationSchema.questions =
metadata.applicationSchema.questions.map(
(q: any): RoundApplicationQuestion => ({
Expand All @@ -71,13 +69,17 @@ export const parseRoundApplicationMetadata = (
})
);

const maxId = Math.max(
...metadata.applicationSchema.questions.map((q) => q.id)
);

metadata.applicationSchema.questions = [
{
id: metadata.applicationSchema.questions.length,
id: maxId + 1,
type: "project",
},
{
id: metadata.applicationSchema.questions.length + 1,
id: maxId + 2,
type: "recipient",
},
...metadata.applicationSchema.questions,
Expand Down
1 change: 0 additions & 1 deletion packages/common/.env.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
REACT_APP_GRANTS_STACK_SEARCH_API_BASE_URL="https://gitcoin-search-dev.fly.dev"
REACT_APP_ALLO_API_URL="https://grants-stack-indexer-v2.gitcoin.co/graphql"
REACT_APP_PINATA_JWT=token-test
REACT_APP_PINATA_BASE_URL=http://localhost
REACT_APP_PASSPORT_API_KEY="test-key"
Expand Down
Loading