Skip to content

fix: label#460

Merged
antoncoding merged 1 commit intomasterfrom
fix/label
Mar 17, 2026
Merged

fix: label#460
antoncoding merged 1 commit intomasterfrom
fix/label

Conversation

@antoncoding
Copy link
Copy Markdown
Owner

@antoncoding antoncoding commented Mar 17, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced vault label resolution with chain-awareness for improved accuracy across different blockchains.
    • Optimized vault APY data retrieval structure.
  • Documentation

    • Added guidelines for vault query schema integrity.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 17, 2026

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

Project Deployment Actions Updated (UTC)
monarch Ready Ready Preview, Comment Mar 17, 2026 4:01pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

The pull request restructures the vault APY field location in API responses and GraphQL queries, moving it from top-level avgApy to nested state.apy, updates corresponding type definitions and logic, makes address label resolution chain-aware, and adds a documentation guideline on vault query schema integrity.

Changes

Cohort / File(s) Summary
API and Type Definitions
src/data-sources/morpho-api/vaults.ts
Moves avgApy from top-level to nested state.apy, updates ApiVault and VaultApysApiResponse types, and adjusts fetch logic to read from the new location.
GraphQL Queries
src/graphql/vault-queries.ts
Removes avgApy field and adds nested state.apy field in vault query items to match the restructured API response.
Component Integration
src/components/shared/account-identity.tsx
Updates useAddressLabel call to include chainId parameter for chain-aware label resolution.
Documentation
AGENTS.md
Adds new guideline item on Morpho vault query schema integrity requirements.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

ui

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'fix: label' is vague and doesn't match the changeset, which involves Morpho vault schema updates, GraphQL queries, and address label resolution. Use a descriptive title like 'refactor: migrate Morpho vault APY to nested state structure' or similar that reflects the actual changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/label
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/data-sources/morpho-api/vaults.ts`:
- Around line 49-53: The response type VaultApysApiResponse is too broad because
Pick<ApiVault, 'address' | 'chain' | 'state'> implies other state fields (like
totalAssets) exist while the GraphQL query (vaultApysQuery) only returns
state.apy; tighten the typing by replacing that Pick with an explicit item type
that only includes address, chain and a state object containing apy (and
optional where appropriate), e.g. define a VaultApyItem type and use it in
VaultApysApiResponse so the parsed response reflects exactly what vaultApysQuery
requests and prevents accidental access to non-requested fields.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 273886eb-9504-4766-8c71-8ec2ce193ca2

📥 Commits

Reviewing files that changed from the base of the PR and between aab0783 and 4637073.

📒 Files selected for processing (4)
  • AGENTS.md
  • src/components/shared/account-identity.tsx
  • src/data-sources/morpho-api/vaults.ts
  • src/graphql/vault-queries.ts

Comment thread src/data-sources/morpho-api/vaults.ts
@antoncoding antoncoding merged commit f111e03 into master Mar 17, 2026
4 checks passed
@antoncoding antoncoding deleted the fix/label branch March 17, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui User interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore vault name resolution in account identity (supplier list)

1 participant