Skip to content

Commit 6a73c37

Browse files
committed
chore: issue on apply
1 parent 338d04f commit 6a73c37

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

packages/builder/src/components/application/Form.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ export default function Form({
111111
const allProjectMetadata = state.grantsMetadata;
112112
const { chainID } = state.web3;
113113

114+
console.log("allProjectMetadata", allProjectMetadata);
114115
const projectIds = Object.keys(allProjectMetadata);
116+
console.log("projectIds", projectIds);
115117

116118
return {
117119
anchors: state.projects.anchor,
@@ -139,6 +141,7 @@ export default function Form({
139141
let selectedProjectMetadata: Metadata | undefined;
140142
let createLinkedProject = false;
141143

144+
// VERIFY LOGIC AFTER POPULATING linkedChains
142145
if (selectedProjectID !== undefined && selectedProjectID !== "") {
143146
selectedProjectMetadata =
144147
props.allProjectMetadata[selectedProjectID]?.metadata;
@@ -302,11 +305,15 @@ export default function Form({
302305

303306
useEffect(() => {
304307
const currentOptions = props.projectIDs.map((id): ProjectOption => {
308+
console.log("currentOptions: id", id);
305309
const chainId = props.allProjectMetadata[id]!.metadata!.chainId!;
306-
310+
console.log("currentOptions: chainId", chainId);
307311
const chain = getChainById(chainId);
312+
console.log("currentOptions: chain", chain);
308313
const chainName = chain.prettyName;
314+
console.log("currentOptions: chainName", chainName);
309315
const { icon } = chain;
316+
console.log("currentOptions: icon", icon);
310317

311318
return {
312319
id,
@@ -319,7 +326,7 @@ export default function Form({
319326
};
320327
});
321328
currentOptions.unshift({ id: undefined, title: "", chainInfo: undefined });
322-
329+
console.log("currentOptions: currentOptions", currentOptions);
323330
setProjectOptions(currentOptions);
324331
}, [props.allProjectMetadata]);
325332

@@ -402,6 +409,8 @@ export default function Form({
402409
return null;
403410
}
404411

412+
console.log("answers", answers);
413+
405414
if (input.type === "project") {
406415
return readOnly ? (
407416
<TextInput

packages/data-layer/src/data-layer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
getRoundsForManagerByAddress,
6060
getDirectDonationsByProjectId,
6161
} from "./queries";
62-
import { orderByMapping } from "./utils";
62+
import { mergeCanonicalAndLinkedProjects, orderByMapping } from "./utils";
6363
import {
6464
AttestationService,
6565
type MintingAttestationIdsData,
@@ -250,8 +250,9 @@ export class DataLayer {
250250
);
251251

252252
if (response.projects.length === 0) return null;
253+
console.log("response.projects", response.projects);
253254

254-
// const project = mergeCanonicalAndLinkedProjects(response.projects)[0];
255+
const project = mergeCanonicalAndLinkedProjects(response.projects)[0];
255256

256257
return { project: response.projects[0] };
257258
}
@@ -316,6 +317,8 @@ export class DataLayer {
316317
requestVariables,
317318
);
318319

320+
// TODO: mergeCanonicalAndLinkedProjects
321+
319322
return response.projects;
320323
}
321324

0 commit comments

Comments
 (0)