Skip to content

fix: deduplicate APY breakdown display#5611

Merged
therealemjy merged 1 commit into
mainfrom
fix/repay-apy-breakdown
Jun 4, 2026
Merged

fix: deduplicate APY breakdown display#5611
therealemjy merged 1 commit into
mainfrom
fix/repay-apy-breakdown

Conversation

@therealemjy
Copy link
Copy Markdown
Member

Changes

  • deduplicate APY breakdown display on repay with wallet balance form

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 3, 2026

🦋 Changeset detected

Latest commit: 0cac16e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

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

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jun 3, 2026 1:18pm
dapp-testnet Ready Ready Preview Jun 3, 2026 1:18pm
venus.io Ready Ready Preview Jun 3, 2026 1:18pm

Request Review

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR fixes a duplicate ApyBreakdown display on the repay-with-wallet-balance form. The Footer component already renders ApyBreakdown for disconnected users in its own branch, so the identical component rendered directly in RepayWithWalletBalanceForm was redundant.

  • Removes the else branch from the isUserConnected ternary in RepayWithWalletBalanceForm, eliminating the duplicate ApyBreakdown render; the Footer's existing unauthenticated path covers this case.
  • Converts the import of BaseError from viem in handleError/index.ts to a type-only import, since it is only used in a type assertion.

Confidence Score: 5/5

Safe to merge — removes redundant UI rendering with no behaviour change for connected users, and the disconnected-user APY breakdown remains intact via the Footer.

Both changes are small and surgical: the duplication fix correctly relies on the Footer's existing rendering logic, and the import type change is a sound cleanup with no runtime effect.

No files require special attention.

Important Files Changed

Filename Overview
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithWalletBalanceForm/index.tsx Removes the duplicate ApyBreakdown rendered for disconnected users; Footer already renders it via its own isUserConnected branch. Ternary is simplified to &&.
apps/evm/src/libs/errors/handleError/index.ts Changes import { BaseError } to import type { BaseError } since BaseError is only used as a type-cast, not a runtime value.
.changeset/dull-gifts-greet.md Adds a patch changeset entry for the APY breakdown deduplication fix.

Reviews (2): Last reviewed commit: "fix: deduplicate APY breakdown display o..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.31% 45808 / 56333
🔵 Statements 81.31% 45808 / 56333
🔵 Functions 62.21% 647 / 1040
🔵 Branches 72.28% 5160 / 7138
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/libs/errors/handleError/index.ts 92.1% 33.33% 100% 92.1% 3, 32-33
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithWalletBalanceForm/index.tsx 97.44% 91% 87.5% 97.44% 99, 185, 475-485, 498
Generated in workflow #13549 for commit 0cac16e by the Vitest Coverage Report Action

@therealemjy
Copy link
Copy Markdown
Member Author

@greptile

Copy link
Copy Markdown
Contributor

@cuzz-venus cuzz-venus left a comment

Choose a reason for hiding this comment

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

/lgtm

@therealemjy therealemjy merged commit 843ce23 into main Jun 4, 2026
5 checks passed
@therealemjy therealemjy deleted the fix/repay-apy-breakdown branch June 4, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants