feat: frv optimazation#5675
Conversation
🦋 Changeset detectedLatest commit: e1fa7b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR updates fixed-rate vault venue handling and vault UI details. The main changes are:
Confidence Score: 4/5This is close, but the venue copy behavior should be fixed before merging.
apps/evm/src/containers/VaultCard/PendleVaultModal/OverviewTab/index.tsx Important Files Changed
Reviews (2): Last reviewed commit: "feat: vaults name style" | Re-trigger Greptile |
| venueName={vault.venueName} | ||
| venueIconSrc={vault.venueIconSrc} | ||
| venueUrl={vault.venueUrl} | ||
| copyAddress={vault.asset?.vToken?.underlyingToken?.address} |
There was a problem hiding this comment.
Venue Row Copies Token Address
The venue row links to the Pendle market, but its copy button now receives vault.asset?.vToken?.underlyingToken?.address. On Pendle vaults this copies the Venus asset's underlying token address instead of the venue or market address, so users copying the venue row get the wrong contract.
There was a problem hiding this comment.
Hey @therealemjy , since its already set underlyingToken address to copyAddress before, can you also help check if it reasonable to set copyAddress={vault.venueAddress}?
|
@greptile review again |
| venueName={vault.venueName} | ||
| venueIconSrc={vault.venueIconSrc} | ||
| venueUrl={vault.venueUrl} | ||
| copyAddress={vault.asset?.vToken?.underlyingToken?.address} |
There was a problem hiding this comment.
The venue row still receives the underlying token address as its copy target. VaultOverviewMarketInfo uses copyAddress for the row labeled Venue, while Pendle vaults already carry the Pendle market address on vault.venueAddress. When a user copies the venue row, they get the deposited asset address instead of the Pendle market address.
| copyAddress={vault.asset?.vToken?.underlyingToken?.address} | |
| copyAddress={vault.venueAddress} |
- rename VaultVenue.Matrixdock -> Institution; all fixed-term vaults use it - filter option gets institution icon + i18n key (vault.filter.institution, 7 locales) - rename riskDisclosureText.matrixDock -> institution key (content unchanged) - fix Pendle overview venue row copyAddress to use vault.venueAddress Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| Object.values(VenueName).map(venueName => [venueName.toLowerCase(), venueName]), | ||
| ) as Record<string, VenueName>; | ||
|
|
||
| export const getVenueConfig = (venueName?: string | null): VenueConfig => { |
There was a problem hiding this comment.
Let's avoid using null whenever we can. Since this function is called with a value coming from the backend, you can format null into undefined when calling the function:
getVenueConfig(nullableBackendValue ?? undefined);| const matchedVenueName = venueNameByKey[key]; | ||
|
|
||
| if (!matchedVenueName) { | ||
| return { name: venueName as string, iconSrc: DEFAULT_VENUE.iconSrc }; |
There was a problem hiding this comment.
This is a small thing, but since you define a default Venue object you can spread it to make sure all future props that might get added to it are also included here:
| return { name: venueName as string, iconSrc: DEFAULT_VENUE.iconSrc }; | |
| return { ...DEFAULT_VENUE, name: venueName as string }; |
Jira ticket(s)
VPD-1509
Changes