Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66739a5d6f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <ProposalHeaderAction | ||
| address={address} | ||
| supportValue={supportValue ?? undefined} | ||
| supportValue={Number(supportValue)} |
There was a problem hiding this comment.
Pass through undefined support values in ProposalHeader
supportValue is coerced with Number(...) before being passed to ProposalHeaderAction, so a missing vote (undefined) becomes NaN. The action component only treats undefined as “not voted”, so connected users who have not voted can fall into the voted branch, lose the “Cast your vote” CTA, and see an incorrect voted state. This affects on-chain proposals whenever votes?.items[0]?.support is absent.
Useful? React with 👍 / 👎.
| if (Array.isArray(choice)) { | ||
| const label = (choice as number[]) | ||
| .map((choice) => choices[choice - 1] ?? `Choice ${choice}`) | ||
| .map((choice) => choices[choice] ?? `Choice ${choice}`) |
There was a problem hiding this comment.
Subtract one when mapping array-based Snapshot choices
The array-choice branch now uses choices[choice], but Snapshot choice values are 1-indexed (consistent with the scalar and object branches in the same helper, which both use - 1). This shifts labels for approval/ranked votes so selected options are displayed as the wrong choices.
Useful? React with 👍 / 👎.
| }, | ||
| gnosis_chain: { | ||
| id: 100, | ||
| rpc: env.RPC_URLS[1], |
There was a problem hiding this comment.
Validate presence of a second RPC URL for Gnosis chain
gnosis_chain reads env.RPC_URLS[1], but the env schema only requires one URL, so valid env input can still produce an undefined RPC endpoint here. That creates a broken chain config at runtime (especially easy to hit in existing single-RPC setups) and can prevent the indexer from starting correctly.
Useful? React with 👍 / 👎.
No description provided.