Skip to content

Commit

Permalink
added created at epoch number to daoCore/dumpState
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Nov 22, 2024
1 parent a6b5885 commit c53fbc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/formulas/formulas/contract/daoCore/dump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type DumpState = {
// Extra.
votingModuleInfo?: ContractInfo
createdAt?: string
createdAtEpoch?: number
adminInfo?: {
admin?: string | null
config: Config
Expand Down Expand Up @@ -171,6 +172,7 @@ export const dumpState: ContractFormula<DumpState> = {
// Extra.
votingModuleInfo,
createdAt,
createdAtEpoch: createdAt ? new Date(createdAt).getTime() : undefined,
adminInfo: adminConfig && {
admin: adminAdmin,
info: adminInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/search/indexers/daos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const daos: MeilisearchIndexer = {
'value.proposalCount',
'value.hideFromSearch',
],
sortableAttributes: ['value.proposalCount'],
sortableAttributes: ['value.proposalCount', 'value.createdAtEpoch'],
matches: async ({ event, state }) => {
if (!(event instanceof WasmStateEvent)) {
return
Expand Down

0 comments on commit c53fbc9

Please sign in to comment.