fix: wait for lend market data hydration#596
Conversation
|
🚅 Deployed to the euler-lite-pr-596 environment in euler-lite
|
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughIn ChangesMarket Data Gate for Vault Loading
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
LeonardEulerXYZ
left a comment
There was a problem hiding this comment.
Reviewed current head c4e3c95dd706b626f285187f13e92d66221c15a6.
Verdict: COMMENT — no blocking findings found.
What changed:
pages/lend/[vault]/index.vuenow waits forisMarketDataResolvedbefore taking the one-time lend-detail vault instance from the registry/direct fetch path.- This aligns the lend detail route with the existing market-data readiness gate used by market grouping/borrow-pair resolution, so reward/intrinsic APY enrichment is less likely to be missed on direct navigation or reload.
Validation performed:
git diff --check origin/development...HEADnpx eslint 'pages/lend/[vault]/index.vue'npm run typechecknpm run build- Browser visual smoke on the Railway PR preview route
/lend/0xD8ec5b4917FeF9058545e7D1dc2aC17F1D26305D?network=143using headed Chromium:- desktop viewport: 4 reloads returned HTTP 200, real app title/content, and stable
Supply APY 7.81%; no material page/console errors - mobile viewport: 4 reloads returned HTTP 200 and stable
Supply APY 7.81%; expandedVault informationrendered the overview and the same APY; no material page/console errors
- desktop viewport: 4 reloads returned HTTP 200, real app title/content, and stable
Risk assessment:
- UX affected: lend detail deeplinks/direct reloads, especially vaults whose APY depends on delayed reward/intrinsic market-data enrichment.
- Safety/transaction impact: no transaction construction, signing, allowance, or wallet boundary code changed. Wallet/signing smoke was not run.
- Main residual caveat: the new wait has a bounded 10s timeout, matching the existing borrow-pair pattern. If enrichment is still unresolved after that, the page intentionally proceeds rather than hanging; this preserves availability but cannot guarantee APY enrichment under a genuinely stalled data load.
Scalability / maintainability hygiene pass:
- I checked for the PR #587-style “one-off local fix” problem. This patch adds a small local wait helper in the lend detail page, and the same wait/timeout shape already exists in
useVaults().getBorrowVaultPair. - For this one-file bug fix I do not see that as blocking: the helper is local to a page-specific direct-route capture point and the duplicate existing pattern is still small.
- If a third direct-route surface needs the same readiness gate, I would extract the wait into
useVaultsor a small shared utility and add focused tests around the timeout/proceed behavior. Not necessary for this PR as-is.
Smoke coverage: browser visual smoke + mobile smoke on the PR preview; no wallet/signing smoke.
Screenshots: captured during local validation, but not attached here because the available GitHub/Gist CLI path does not support uploading binary PNGs directly in this environment, and I did not want to create a brittle non-rendering artifact on a public PR.
Summary
Changes
isMarketDataResolvedon the lend detail page.Test plan
pages/lend/[vault]/index.vue/lend/0xD8ec5b4917FeF9058545e7D1dc2aC17F1D26305D?network=143on local port 3001 and confirmed Supply APY settled at 7.80% across reloadsSummary by CodeRabbit