Skip to content

Commit

Permalink
Use indexer for more queries in static props getter.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Jul 16, 2023
1 parent 89a5a41 commit cb38c35
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const fetchPreProposeAddress: FetchPreProposeAddressFunction = async (
address: proposalModuleAddress,
formula: 'daoProposalMultiple/creationPolicy',
chainId,
// TODO(numia): Remove this once provided.
required: true,
})
} catch (err) {
// Ignore error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const fetchPreProposeAddress: FetchPreProposeAddressFunction = async (
address: proposalModuleAddress,
formula: 'daoProposalSingle/creationPolicy',
chainId,
// TODO(numia): Remove this once provided.
required: true,
})
} catch (err) {
// Ignore error.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const makeGetProposalInfo =
address: proposalModule.address,
formula: 'info',
chainId,
// TODO(numia): Remove this once provided.
required: true,
})
} catch (err) {
// Ignore error.
Expand All @@ -73,6 +75,8 @@ export const makeGetProposalInfo =
id: proposalNumber,
},
chainId,
// TODO(numia): Remove this once provided.
required: true,
})
} catch (err) {
// Ignore error.
Expand Down Expand Up @@ -127,6 +131,8 @@ export const makeGetProposalInfo =
id,
},
chainId,
// TODO(numia): Remove this once provided.
required: true,
})
// If indexer returned a value, assume it's a date.
if (createdAt) {
Expand Down
2 changes: 2 additions & 0 deletions packages/stateful/server/makeGetDaoStaticProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ const daoCoreDumpState = async (
address: coreAddress,
formula: 'daoCore/listItems',
chainId: CHAIN_ID,
// TODO(numia): Remove this once provided.
required: true,
})) ?? []

const parentDaoInfo = await loadParentDaoInfo(
Expand Down

3 comments on commit cb38c35

@vercel
Copy link

@vercel vercel bot commented on cb38c35 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cb38c35 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cb38c35 Jul 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.