Skip to content

Add Kleros tags to oracle feed badges#539

Closed
antoncoding wants to merge 1 commit into
masterfrom
codex/kleros-oracle-tags
Closed

Add Kleros tags to oracle feed badges#539
antoncoding wants to merge 1 commit into
masterfrom
codex/kleros-oracle-tags

Conversation

@antoncoding
Copy link
Copy Markdown
Owner

Summary

  • batch Kleros Scout tag lookups for standard and meta oracle feed badges
  • show Kleros fallback labels for unclassified feed badges and source links in tooltips
  • add Kleros tags for primary/backup oracle contracts in meta oracle detail views

Validation

  • pnpm typecheck
  • pnpm build
  • git diff --check

Note: npx ultracite fix/check currently fail before scanning changed files because biome.jsonc contains unsupported rule keys.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monarch Ready Ready Preview, Comment May 20, 2026 3:27pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@antoncoding has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 26 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3e878e1b-7a22-492c-92e3-27f60c7d7d36

📥 Commits

Reviewing files that changed from the base of the PR and between 117b94c and 5581159.

📒 Files selected for processing (6)
  • src/components/shared/kleros-tag-badge.tsx
  • src/features/markets/components/oracle/MarketOracle/FeedEntry.tsx
  • src/features/markets/components/oracle/MarketOracle/GeneralFeedTooltip.tsx
  • src/features/markets/components/oracle/MarketOracle/MarketOracleFeedInfo.tsx
  • src/features/markets/components/oracle/MarketOracle/MetaOracleInfo.tsx
  • src/features/markets/components/oracle/MarketOracle/UnknownFeedTooltip.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/kleros-oracle-tags

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates Kleros address tags into the market oracle components, allowing for fallback labels and metadata to be displayed for unknown price feeds. The changes include updates to tooltips and oracle information displays to fetch and show Kleros-sourced tags. A logic issue was identified in MetaOracleInfo.tsx where the active oracle check could incorrectly evaluate to true while metadata is still loading.

const { data: feedSnapshotsByAddress } = useFeedLastUpdatedByChain(chainId);

const metaData = getMetaOracleDataFromMetadata(oracleMetadataMap, oracleAddress, chainId);
const isPrimaryActive = Boolean(metaData?.currentOracle?.toLowerCase() === metaData?.primaryOracle?.toLowerCase());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic for isPrimaryActive is fragile when metaData is null or undefined. Due to optional chaining, undefined === undefined evaluates to true, which means isPrimaryActive incorrectly defaults to true while metadata is still loading. Additionally, the Boolean() wrapper is redundant as the comparison already returns a boolean value. It's clearer to explicitly check for metaData.

Suggested change
const isPrimaryActive = Boolean(metaData?.currentOracle?.toLowerCase() === metaData?.primaryOracle?.toLowerCase());
const isPrimaryActive = metaData ? metaData.currentOracle?.toLowerCase() === metaData.primaryOracle?.toLowerCase() : false;

@antoncoding
Copy link
Copy Markdown
Owner Author

Closing this PR: after checking the current oracle metadata and market oracle/feed address sets against Kleros Scout, there is no live overlap to show. We are not integrating Kleros on oracle badges for now.

@antoncoding antoncoding deleted the codex/kleros-oracle-tags branch May 21, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant