Repository navigation
Conversation
The proposal timeline rendered "Payload N executed" for every payload, including ones still queued or created, so Passed proposals appeared to have executed. Derive the label from the payload state instead. Closes aave#2480
|
@Krshivam25 is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
General Changes
queuedorcreated, so a Passed-but-unexecuted proposal appeared to have already executed on-chain.Developer Notes
Root cause: in
src/modules/governance/proposal/ProposalTimeline.tsx, the sub-row label was emitted unconditionally as<Trans>Payload {id} executed</Trans>insidelist.map(). Theif/elsechain above it varied only the right-hand value and tone, never the label — so aqueuedpayload rendered "Payload 123 executed" next to its own "in 6h" countdown.queuedin 6h/Ready to executecreated~Nov 3, 2025 4:00 PM(estimate)executedApproach: the state-to-label mapping is extracted into a new pure helper,
getPayloadLabelKindinsrc/modules/governance/utils/payloadStatus.ts, so it can be unit tested without rendering.ProposalTimeline.tsxkeeps the<Trans>strings (lingui needs them statically analysable) and renders the kind. Unrecognised states fall back to a neutral label and never to "executed" —ProposalPayload.stateis a free-form string from the governance cache, so a new state value should never silently assert an on-chain action.Tests: added
src/modules/governance/__tests__/payloadStatus.test.ts— 10 pure-logic cases covering each state plus unknown/empty/null/undefined, matching the repo's existing pure-function test style. Thequeued → "not executed"case is the regression guard.i18n: new
<Trans>strings, so catalogs were regenerated withpnpm i18nand committed.Out of scope: step 6's
Payload {id} receivedlabel has the same shape, but its value column already renders a visible estimate and "received" is a much weaker claim than "executed". Happy to follow up separately if you'd like it changed too.Pre-existing failures: 4 jest suites in
src/utils/fail onmainalready (awagmi/chainsimport issue) and are unaffected by this change.Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files