Feat/vai error show#5605
Conversation
🦋 Changeset detectedLatest commit: c85bf96 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 removes the duplicate inline error message shown below the VAI Borrow and Repay amount inputs by adding an opt-in
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to VAI pages and preserves existing behaviour for all other consumers of RhfTokenTextField. The new prop defaults to false, so every existing callsite (including VaultCard/TransactionForm, which relies on inline error text for price-impact and Pendle-quote errors) is unaffected. The VAI Borrow and Repay pages already have dedicated NoticeError components, making the suppressed inline description genuinely redundant. No logic is removed — only the duplicate display path on those two pages is hidden. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "feat: remove raw translate key" | Re-trigger Greptile |
Coverage Report for ./apps/evm
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
@greptile review again |
| name="amountTokens" | ||
| rules={{ required: true }} | ||
| disabled={!isUserConnected || isUserMissingPrimeToken} | ||
| hideErrorDescription |
There was a problem hiding this comment.
I'd recommend taking a different approach.
This form is behaving differently in the sense that we use a custom UI to show errors. The designs were made quite a while ago and so I think we'd be better off staying consistent with the newest form.
So the approach I propose is to update the useForm hook of this component so that the error that's set on the field isn't an error code but rather the full error message. This means the RhfTokenTextField component won't need to be updated and will natively display the human-friendly error message.
Jira ticket(s)
VPD-1256
Changes
before:

after:
