fix(governance): change proposal sort order (#3716)
This commit is contained in:
parent
653cec2592
commit
bf73559c30
@ -24,7 +24,6 @@ const openProposalClosesNextMonth = generateProposal({
|
|||||||
},
|
},
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: nextMonth.toString(),
|
closingDatetime: nextMonth.toString(),
|
||||||
enactmentDatetime: nextMonth.toString(),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -36,7 +35,6 @@ const openProposalClosesNextWeek = generateProposal({
|
|||||||
},
|
},
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: nextWeek.toString(),
|
closingDatetime: nextWeek.toString(),
|
||||||
enactmentDatetime: nextWeek.toString(),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -45,7 +43,6 @@ const enactedProposalClosedLastWeek = generateProposal({
|
|||||||
state: ProposalState.STATE_ENACTED,
|
state: ProposalState.STATE_ENACTED,
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: lastWeek.toString(),
|
closingDatetime: lastWeek.toString(),
|
||||||
enactmentDatetime: lastWeek.toString(),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -54,7 +51,6 @@ const failedProposalClosedLastMonth = generateProposal({
|
|||||||
state: ProposalState.STATE_FAILED,
|
state: ProposalState.STATE_FAILED,
|
||||||
terms: {
|
terms: {
|
||||||
closingDatetime: lastMonth.toString(),
|
closingDatetime: lastMonth.toString(),
|
||||||
enactmentDatetime: lastMonth.toString(),
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -20,8 +20,11 @@ import { useProtocolUpgradeProposalsQuery } from '@vegaprotocol/proposals';
|
|||||||
const orderByDate = (arr: ProposalFieldsFragment[]) =>
|
const orderByDate = (arr: ProposalFieldsFragment[]) =>
|
||||||
orderBy(
|
orderBy(
|
||||||
arr,
|
arr,
|
||||||
[(p) => new Date(p?.terms?.closingDatetime).getTime(), (p) => p.id],
|
[
|
||||||
['desc', 'desc']
|
(p) => new Date(p?.terms?.closingDatetime).getTime(),
|
||||||
|
(p) => new Date(p?.datetime).getTime(),
|
||||||
|
],
|
||||||
|
['asc', 'asc']
|
||||||
);
|
);
|
||||||
|
|
||||||
const orderByUpgradeBlockHeight = (
|
const orderByUpgradeBlockHeight = (
|
||||||
|
Loading…
Reference in New Issue
Block a user