Skip to content

Commit

Permalink
fix: show the eta date for queued proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
gleiser-oliveira committed Nov 4, 2023
1 parent 80ece2f commit 9293e2e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`api/queries/getProposal > returns proposal 1`] = `
},
"endBlock": 33499859,
"endDate": 2023-09-20T07:54:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33499859,
"endDate": 2023-09-20T07:54:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -88,6 +89,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33499859,
"endDate": 2023-09-20T07:54:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -132,6 +134,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33446667,
"endDate": 2023-09-18T11:34:41.000Z,
"etaDate": 2023-09-19T07:59:29.000Z,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -176,6 +179,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33358842,
"endDate": 2023-09-15T10:23:20.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -220,6 +224,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33340981,
"endDate": 2023-09-14T19:30:15.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -264,6 +269,7 @@ exports[`api/queries/getProposals > Gets called with correct default arguments 1
},
"endBlock": 33337008,
"endDate": 2023-09-14T16:11:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -318,6 +324,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33499859,
"endDate": 2023-09-20T07:54:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -382,6 +389,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33499859,
"endDate": 2023-09-20T07:54:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -426,6 +434,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33446667,
"endDate": 2023-09-18T11:34:41.000Z,
"etaDate": 2023-09-19T07:59:29.000Z,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -470,6 +479,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33358842,
"endDate": 2023-09-15T10:23:20.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -514,6 +524,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33340981,
"endDate": 2023-09-14T19:30:15.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down Expand Up @@ -558,6 +569,7 @@ exports[`api/queries/getProposals > returns formatted proposals 1`] = `
},
"endBlock": 33337008,
"endDate": 2023-09-14T16:11:35.000Z,
"etaDate": undefined,
"executedDate": undefined,
"executedTxHash": undefined,
"forVotes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33336002,
"endDate": 2023-09-14T15:21:17.000Z,
"etaDate": 2023-09-14T15:32:50.000Z,
"executedDate": 2023-09-14T15:39:44.000Z,
"executedTxHash": "0xac2d0b0876517e098d16aa4546b66a0f92391fb025a76fb25e8f3989e8be1dd1",
"forVotes": [
Expand Down Expand Up @@ -87,6 +88,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33279845,
"endDate": 2023-09-12T16:33:23.000Z,
"etaDate": 2023-09-12T16:46:41.000Z,
"executedDate": 2023-09-12T16:47:38.000Z,
"executedTxHash": "0x5b4f35529ccabfedeac5db1eea9385ab63a804c14f68c5e99a47ba96b6281f76",
"forVotes": [
Expand Down Expand Up @@ -137,6 +139,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33279456,
"endDate": 2023-09-12T16:13:56.000Z,
"etaDate": 2023-09-12T16:25:26.000Z,
"executedDate": 2023-09-12T16:28:35.000Z,
"executedTxHash": "0xc15918d42abe6dba39b1872784671e72769135bc32811012f4712e45ceacc0bf",
"forVotes": [
Expand Down Expand Up @@ -187,6 +190,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33243153,
"endDate": 2023-09-11T09:58:47.000Z,
"etaDate": 2023-09-11T10:28:11.000Z,
"executedDate": 2023-09-11T10:34:59.000Z,
"executedTxHash": "0x95014a018718ec888a696259d470715799249071c39e8b1d8c76da407e2de72a",
"forVotes": [
Expand Down Expand Up @@ -239,6 +243,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 32926185,
"endDate": 2023-08-31T09:50:13.000Z,
"etaDate": 2023-08-31T10:52:34.000Z,
"executedDate": 2023-08-31T10:55:01.000Z,
"executedTxHash": "0x684ed7132eae0ef40ac3fa13f5e66e05ce4b80cb2bc42806f423b35a4357bbfa",
"forVotes": [
Expand Down Expand Up @@ -289,6 +294,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 32870813,
"endDate": 2023-08-29T11:41:37.000Z,
"etaDate": 2023-08-29T11:52:16.000Z,
"executedDate": 2023-08-29T11:54:52.000Z,
"executedTxHash": "0xb06be6ed9813e4e4c675702bd74bb0f75c897c25365d9eea3387520c9ff39257",
"forVotes": [
Expand Down Expand Up @@ -361,6 +367,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33336002,
"endDate": 2023-09-14T15:21:17.000Z,
"etaDate": 2023-09-14T15:32:50.000Z,
"executedDate": 2023-09-14T15:39:44.000Z,
"executedTxHash": "0xac2d0b0876517e098d16aa4546b66a0f92391fb025a76fb25e8f3989e8be1dd1",
"forVotes": [
Expand Down Expand Up @@ -411,6 +418,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33279845,
"endDate": 2023-09-12T16:33:23.000Z,
"etaDate": 2023-09-12T16:46:41.000Z,
"executedDate": 2023-09-12T16:47:38.000Z,
"executedTxHash": "0x5b4f35529ccabfedeac5db1eea9385ab63a804c14f68c5e99a47ba96b6281f76",
"forVotes": [
Expand Down Expand Up @@ -461,6 +469,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33279456,
"endDate": 2023-09-12T16:13:56.000Z,
"etaDate": 2023-09-12T16:25:26.000Z,
"executedDate": 2023-09-12T16:28:35.000Z,
"executedTxHash": "0xc15918d42abe6dba39b1872784671e72769135bc32811012f4712e45ceacc0bf",
"forVotes": [
Expand Down Expand Up @@ -511,6 +520,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 33243153,
"endDate": 2023-09-11T09:58:47.000Z,
"etaDate": 2023-09-11T10:28:11.000Z,
"executedDate": 2023-09-11T10:34:59.000Z,
"executedTxHash": "0x95014a018718ec888a696259d470715799249071c39e8b1d8c76da407e2de72a",
"forVotes": [
Expand Down Expand Up @@ -563,6 +573,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 32926185,
"endDate": 2023-08-31T09:50:13.000Z,
"etaDate": 2023-08-31T10:52:34.000Z,
"executedDate": 2023-08-31T10:55:01.000Z,
"executedTxHash": "0x684ed7132eae0ef40ac3fa13f5e66e05ce4b80cb2bc42806f423b35a4357bbfa",
"forVotes": [
Expand Down Expand Up @@ -613,6 +624,7 @@ Simulation of the VIP: [https://github.com/VenusProtocol/vips/pull/70](https://g
},
"endBlock": 32870813,
"endDate": 2023-08-29T11:41:37.000Z,
"etaDate": 2023-08-29T11:52:16.000Z,
"executedDate": 2023-08-29T11:54:52.000Z,
"executedTxHash": "0xb06be6ed9813e4e4c675702bd74bb0f75c897c25365d9eea3387520c9ff39257",
"forVotes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ interface GovernanceProposalProps {
endDate?: Date;
cancelDate?: Date;
queuedDate?: Date;
etaDate?: Date;
executedDate?: Date;
userVoteStatus?: VoteSupport;
forVotesMantissa?: BigNumber;
Expand All @@ -129,7 +130,7 @@ const GovernanceProposalUi: React.FC<GovernanceProposalProps> = ({
proposalTitle,
proposalState,
executedDate,
queuedDate,
etaDate,
cancelDate,
endDate,
userVoteStatus,
Expand Down Expand Up @@ -171,7 +172,7 @@ const GovernanceProposalUi: React.FC<GovernanceProposalProps> = ({
case ProposalState.Executed:
return [executedDate, 'voteProposalUi.executedDate'];
case ProposalState.Queued:
return [queuedDate, 'voteProposalUi.queuedUntilDate'];
return [etaDate, 'voteProposalUi.queuedUntilDate'];
case ProposalState.Defeated:
return [endDate, 'voteProposalUi.defeatedDate'];
default:
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Governance/ProposalList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export const ProposalListUi: React.FC<ProposalListUiProps> = ({
endDate,
cancelDate,
queuedDate,
etaDate,
forVotesMantissa,
abstainedVotesMantissa,
againstVotesMantissa,
Expand All @@ -103,6 +104,7 @@ export const ProposalListUi: React.FC<ProposalListUiProps> = ({
executedDate={executedDate}
cancelDate={cancelDate}
queuedDate={queuedDate}
etaDate={etaDate}
forVotesMantissa={forVotesMantissa}
againstVotesMantissa={againstVotesMantissa}
abstainedVotesMantissa={abstainedVotesMantissa}
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export interface Proposal {
proposalId: number;
proposer: string;
queuedDate: Date | undefined;
etaDate: Date | undefined;
startDate: Date | undefined;
state: ProposalState;
cancelDate: Date | undefined;
Expand Down
2 changes: 2 additions & 0 deletions src/utilities/formatToProposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const formatToProposal = ({
executedTimestamp,
proposer,
queuedTimestamp,
eta,
startTimestamp,
state,
createdTxHash,
Expand Down Expand Up @@ -114,6 +115,7 @@ const formatToProposal = ({
proposalId,
proposer,
queuedDate: queuedTimestamp ? createDateFromSecondsTimestamp(queuedTimestamp) : undefined,
etaDate: eta ? createDateFromSecondsTimestamp(eta) : undefined,
startDate: createDateFromSecondsTimestamp(startTimestamp),
state,
createdTxHash: createdTxHash ?? undefined,
Expand Down

0 comments on commit 9293e2e

Please sign in to comment.