Skip to content

feat: improve reusability of operation form components#5133

Merged
therealemjy merged 1 commit intomainfrom
refactor/operation-details-forms
Feb 4, 2026
Merged

feat: improve reusability of operation form components#5133
therealemjy merged 1 commit intomainfrom
refactor/operation-details-forms

Conversation

@therealemjy
Copy link
Copy Markdown
Member

@therealemjy therealemjy commented Dec 11, 2025

Changes

evm app

  • add ApproveToken and ApproveDelegate containers to share between various forms that require an approval before submitting a transaction
  • set Biome as default formatter in VSCode config
  • add Footer component and implement it in the Supply form. In the following PRs, I'll refactor the other operation forms to use this component to remove some code duplicates
  • add useCommonValidation hook to be used on every operation details form to detect errors that are common among them

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 11, 2025

🦋 Changeset detected

Latest commit: a250e8e

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 Minor

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 Dec 11, 2025

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

Project Deployment Actions Updated (UTC)
app.venus.io Ready Ready Preview Feb 4, 2026 9:50am
dapp-preview Ready Ready Preview Feb 4, 2026 9:50am
dapp-testnet Ready Ready Preview Feb 4, 2026 9:50am
venus.io Ready Ready Preview Feb 4, 2026 9:50am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 16, 2025

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 77.47% 35194 / 45429
🔵 Statements 77.47% 35194 / 45429
🔵 Functions 60.59% 569 / 939
🔵 Branches 72.55% 4269 / 5884
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/components/ApproveTokenSteps/index.tsx 100% 66.66% 100% 100%
apps/evm/src/containers/ApproveDelegate/index.tsx 100% 50% 100% 100%
apps/evm/src/containers/ApproveToken/index.tsx 100% 0% 100% 100%
apps/evm/src/containers/Form/RhfSubmitButton/index.tsx 95.74% 66.66% 100% 95.74% 63-66
apps/evm/src/containers/Layout/NavBar/MenuItem/SubMenuContent/SubMenuItem/index.tsx 0% 0% 0% 0% 1-91
apps/evm/src/hooks/useDelegateApproval/index.ts 85.36% 75% 50% 85.36% 1, 35-38, 54
apps/evm/src/hooks/useGetSwapInfo/index.ts 99.32% 97.43% 100% 99.32% 1
apps/evm/src/hooks/useTokenApproval/index.ts 0% 0% 0% 0% 1-109
apps/evm/src/pages/Market/OperationForm/index.tsx 85.14% 25% 25% 85.14% 96-115
apps/evm/src/pages/Market/OperationForm/ApproveDelegateSteps/index.tsx 96.15% 33.33% 100% 96.15% 28
apps/evm/src/pages/Market/OperationForm/BoostForm/index.tsx 94.4% 91.46% 76.92% 94.4% 148-151, 271-281, 312-321
apps/evm/src/pages/Market/OperationForm/BoostForm/SubmitSection/index.tsx 100% 80% 0% 100%
apps/evm/src/pages/Market/OperationForm/BorrowForm/index.tsx 93.64% 88.13% 80% 93.64% 87-92, 235-251, 472
apps/evm/src/pages/Market/OperationForm/BorrowForm/SubmitSection/index.tsx 100% 88.88% 100% 100%
apps/evm/src/pages/Market/OperationForm/Footer/index.tsx 100% 92.3% 100% 100%
apps/evm/src/pages/Market/OperationForm/Footer/SubmitButton/index.tsx 79.48% 42.85% 100% 79.48% 31, 47, 49-56
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithCollateralForm/index.tsx 96.52% 93.47% 90% 96.52% 163-166, 298-308, 377
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithCollateralForm/SubmitSection/index.tsx 100% 80% 0% 100%
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithWalletBalanceForm/index.tsx 99.62% 92.85% 100% 99.62% 620, 648
apps/evm/src/pages/Market/OperationForm/Repay/RepayWithWalletBalanceForm/SubmitSection/index.tsx 100% 94.44% 100% 100%
apps/evm/src/pages/Market/OperationForm/SupplyForm/index.tsx 93.07% 86.36% 100% 93.07% 109, 229, 281-290, 418-433, 444-445, 467-468
apps/evm/src/pages/Market/OperationForm/SupplyForm/SubmitSection/index.tsx 0% 100% 100% 0% 2-105
apps/evm/src/pages/Market/OperationForm/SupplyForm/useForm/index.tsx 89.74% 50% 100% 89.74% 1, 111-119
apps/evm/src/pages/Market/OperationForm/SupplyForm/useForm/useFormValidation.ts 92.45% 91.66% 100% 92.45% 1, 123-129
apps/evm/src/pages/Market/OperationForm/WithdrawForm/index.tsx 92.87% 89.7% 88.88% 92.87% 82-85, 160, 249-265, 289, 468-473
apps/evm/src/pages/Market/OperationForm/WithdrawForm/SubmitSection/index.tsx 100% 88.88% 100% 100%
apps/evm/src/pages/Market/OperationForm/useCommonValidation/index.ts 99.4% 97.43% 100% 99.4% 3
apps/evm/src/pages/Swap/SubmitSection/index.tsx 100% 96.87% 100% 100%
Generated in workflow #12525 for commit a250e8e by the Vitest Coverage Report Action

Comment thread apps/evm/src/containers/ApproveDelegate/index.tsx Outdated
Comment thread .vscode/settings.json
@therealemjy therealemjy merged commit 9b125af into main Feb 4, 2026
6 checks passed
@therealemjy therealemjy deleted the refactor/operation-details-forms branch February 4, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants