fix: preserve Earn vault curation during refresh - #863
Conversation
Derive refreshed verification from the current Earn labels and cover unlisted and delisted vaults.
|
🚅 Deployed to the euler-lite-pr-863 environment in euler-lite(dev,PR previews)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: euler-xyz/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
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. 📝 WalkthroughWalkthroughEarn vault refreshes now verify only curated vault addresses. Tests cover dynamic vault discovery, curated vault verification, unlisted vault handling, and removal of stale verification. ChangesEarn vault verification
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The refresh behavior preserves curation-based verification, including unlisted and delisted vault handling. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
LeonardEulerXYZ
left a comment
There was a problem hiding this comment.
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.
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: truetherefore 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
updateEarnVaultsderives 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 receivesverified: false.The existing chain/generation checks continue to guard registry writes. Listing and acknowledgement consumers use their existing verification rules.
Validation
Summary by CodeRabbit
Bug Fixes
Tests