Skip to content

fix: preserve Earn vault curation during refresh - #863

Open
Seranged wants to merge 1 commit into
developmentfrom
fix/lite-332
Open

fix: preserve Earn vault curation during refresh#863
Seranged wants to merge 1 commit into
developmentfrom
fix/lite-332

Conversation

@Seranged

@Seranged Seranged commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Issue

Opening an unlisted Earn vault through a direct link adds it to the local registry. Background refresh fetches all registered Earn vaults, including those discovered through direct navigation. Registering every refreshed result with verified: true therefore promotes an unlisted vault to verified without a curation decision.

That flag is used by the Earn listing and owner-verification rules. For a vault without a product entry, false verification can admit it to the verified listing and remove the unverified-vault acknowledgement requirement. The initial navigation disclaimer does not prevent this later promotion.

Resolution

updateEarnVaults derives each refreshed vault's verification from membership in the current Earn labels, using normalized addresses. Refresh updates vault data without granting trust to dynamically discovered addresses. Curated vaults retain verification, and a refreshed vault removed from curation receives verified: false.

The existing chain/generation checks continue to guard registry writes. Listing and acknowledgement consumers use their existing verification rules.

Validation

  • Regression coverage exercises direct discovery followed by refresh, confirms unlisted vaults fail owner verification, and confirms curated vaults remain trusted.
  • Additional coverage verifies that refresh clears a stale verification flag when a vault is absent from current curation.
  • Node 24: lint (six existing warnings), typecheck, production build, and all 2,166 tests passed.
  • No live browser or wallet execution test.

Summary by CodeRabbit

  • Bug Fixes

    • Earn vault verification now reflects whether a vault is included in the configured curated list.
    • Dynamically discovered vaults are refreshed without being marked as verified.
    • Verification is cleared when a vault is removed from the curated list.
  • Tests

    • Added coverage for vault refresh and verification behavior.

Derive refreshed verification from the current Earn labels and cover unlisted and delisted vaults.
@railway-app

railway-app Bot commented Sep 11, 2026

Copy link
Copy Markdown

🚅 Deployed to the euler-lite-pr-863 environment in euler-lite(dev,PR previews)

Service Status Web Updated
dev-build ✅ Success (View Logs) Web Sep 11, 2026 at 12:03 pm UTC

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: euler-xyz/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: c3435578-dfd0-4503-a063-1049c21f6813

📥 Commits

Reviewing files that changed from the base of the PR and between 67d01d4 and 027e39a.

📒 Files selected for processing (2)
  • composables/useVaults.ts
  • tests/composables/useVaults.test.ts

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

Earn vault refreshes now verify only curated vault addresses. Tests cover dynamic vault discovery, curated vault verification, unlisted vault handling, and removal of stale verification.

Changes

Earn vault verification

Layer / File(s) Summary
Verification refresh and coverage
composables/useVaults.ts, tests/composables/useVaults.test.ts
updateEarnVaults verifies fetched vaults only when their normalized addresses appear in the configured Earn vault label list. Tests cover unlisted vaults and clearing verification after curation removal.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: dglowinski

Merge Risk: ⚪ Minimal · up to 027e3

The refresh behavior preserves curation-based verification, including unlisted and delisted vault handling.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preserving Earn vault curation during refresh.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/lite-332

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

@LeonardEulerXYZ LeonardEulerXYZ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Scoped Earn-verification regression review at 027e39a: no concrete PR-introduced findings. Traced bulk/background refresh, direct and single-vault refresh, registry metadata replacement/preservation, current Earn curation, listing filters, product-owner verification, UI acknowledgement context and final execution acknowledgement checks. Validation: 70 tests passed across six relevant test files; targeted ESLint and Nuxt typecheck passed on Node v26.5.1. No live browser/wallet execution or production build performed in this scoped review; this is not a whole-application approval.

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.

2 participants