Skip to content

feat: add Liquidity form skeletons#5684

Open
therealemjy wants to merge 1 commit into
mainfrom
feat/liquidity-hub-forms
Open

feat: add Liquidity form skeletons#5684
therealemjy wants to merge 1 commit into
mainfrom
feat/liquidity-hub-forms

Conversation

@therealemjy

Copy link
Copy Markdown
Member

Jira ticket(s)

VPD-1559

Changes

This PR serves as a base for the Liquidity Hub Supply/Withdraw forms.

  • add Liquidity Hub form scaffolding in apps/evm, including the row-action modal, hub accessor, and tabbed Supply / Withdraw entry points.
  • implement the first Supply with collateral flow, with shared form state, SAFE MAX, available-balance autofill, converted spending-limit display, and approval support for collateral vTokens
  • extract reusable balance/limit utilities by adding a shared WalletBalance container and a new calculateCollateralWithdrawLimits helper, then reuse that logic in existing withdraw/trade flows
  • extend shared token/query support for Liquidity Hub work (VhToken/VToken handling, LiquidityHubMigrator config, wallet add-token support) and add translations plus targeted tests for the new forms and helpers

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jul 15, 2026 1:08pm
dapp-testnet Ready Ready Preview Jul 15, 2026 1:08pm
venus.io Ready Ready Preview Jul 15, 2026 1:08pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 274766e

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

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds the first Liquidity Hub form scaffolding for EVM markets. The main changes are:

  • Liquidity Hub modal, accessor, and Supply/Withdraw tabs.
  • Supply with collateral form shell with approval and max-balance UI.
  • Shared wallet balance and collateral-withdraw limit helpers.
  • VToken and VhToken support in approval, allowance, wallet, and add-token paths.
  • Translations and targeted tests for the new form pieces.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/evm/src/hooks/useTokenApproval/index.ts Extends approval handling to Token and VToken inputs while preserving the native-token allowance skip.
apps/evm/src/containers/LiquidityHubForm/SupplyTabs/SupplyWithCollateralForm/index.tsx Adds the collateral supply form shell with VToken approval, available amount, and SAFE MAX wiring.
apps/evm/src/containers/LiquidityHubForm/Form/useForm/useFormValidation/index.ts Adds the placeholder validation hook used by the Liquidity Hub form shell.
apps/evm/src/containers/WalletBalance/index.tsx Extracts a shared wallet balance and spending-limit display backed by balance and allowance queries.
apps/evm/src/utilities/calculateCollateralWithdrawLimits/index.ts Centralizes collateral withdraw limit calculation for existing withdraw flows and the new Liquidity Hub form.

Reviews (2): Last reviewed commit: "feat: add basic SupplyWithCollateralForm..." | Re-trigger Greptile

Comment thread apps/evm/src/hooks/useTokenApproval/index.ts Outdated
Comment thread apps/evm/src/containers/WalletBalance/index.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 010edc5da8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/evm/src/hooks/useTokenApproval/index.ts Outdated
@therealemjy

Copy link
Copy Markdown
Member Author

@greptile

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 82.98% 51516 / 62078
🔵 Statements 82.98% 51516 / 62078
🔵 Functions 63.11% 681 / 1079
🔵 Branches 72.72% 5894 / 8105
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/clients/api/queries/getAllowance/index.ts 94.44% 0% 100% 94.44% 3
apps/evm/src/clients/api/queries/getAllowance/useGetAllowance.ts 100% 100% 100% 100%
apps/evm/src/clients/api/queries/useGetPool/index.tsx 96.29% 66.66% 100% 96.29% 1
apps/evm/src/clients/api/queries/useGetPools/useGetPoolsQuery/index.ts 96% 75% 100% 96% 1, 116-117
apps/evm/src/components/BalanceUpdates/index.tsx 100% 88% 100% 100%
apps/evm/src/components/SpendingLimit/index.tsx 94.44% 72.72% 100% 94.44% 36-37, 65
apps/evm/src/containers/ApproveToken/index.tsx 100% 0% 100% 100%
apps/evm/src/containers/Layout/Header/MarketInfo/AddTokenToWalletDropdown/index.tsx 0% 0% 0% 0% 1-82
apps/evm/src/containers/LiquidityHubAccessor/index.tsx 100% 80% 100% 100%
apps/evm/src/containers/LiquidityHubForm/index.tsx 0% 0% 0% 0% 1-55
apps/evm/src/containers/LiquidityHubForm/Form/index.tsx 94.44% 45.45% 66.66% 94.44% 59, 93-95, 128, 131
apps/evm/src/containers/LiquidityHubForm/Form/useForm/index.tsx 90.19% 40% 100% 90.19% 1, 97-101
apps/evm/src/containers/LiquidityHubForm/Form/useForm/useFormValidation/index.ts 100% 0% 100% 100%
apps/evm/src/containers/LiquidityHubForm/SupplyTabs/index.tsx 0% 0% 0% 0% 1-73
apps/evm/src/containers/LiquidityHubForm/SupplyTabs/SupplyWithCollateralForm/index.tsx 100% 83.33% 100% 100%
apps/evm/src/containers/LiquidityHubForm/SupplyTabs/SupplyWithCollateralForm/ConvertedSpendingLimit/index.tsx 100% 0% 100% 100%
apps/evm/src/containers/LiquidityHubFormModal/index.tsx 0% 0% 0% 0% 1-16
apps/evm/src/containers/MarketForm/ApyBreakdown/index.tsx 100% 96.55% 100% 100%
apps/evm/src/containers/MarketForm/WithdrawForm/index.tsx 92.35% 89.09% 88.88% 92.35% 83-86, 186-202, 226, 410-415
apps/evm/src/containers/WalletBalance/index.tsx 100% 88.88% 100% 100%
apps/evm/src/hooks/useConvertMantissaToReadableTokenString.ts 93.75% 80% 100% 93.75% 1
apps/evm/src/hooks/useCommonValidation/index.ts 99.46% 96.72% 100% 99.46% 1
apps/evm/src/hooks/useTokenApproval/index.ts 0% 0% 0% 0% 1-111
apps/evm/src/libs/contracts/config/index.ts 0% 100% 100% 0% 3-947
apps/evm/src/libs/wallet/hooks/useAddTokenToWallet/index.ts 100% 100% 100% 100%
apps/evm/src/pages/LiquidityHub/LiquidityHubTable/index.tsx 0% 0% 0% 0% 1-163
apps/evm/src/pages/LiquidityHub/LiquidityHubTable/RowControl/index.tsx 0% 0% 0% 0% 1-30
apps/evm/src/pages/Trade/PositionForm/Form/index.tsx 96.69% 94.24% 72.72% 96.69% 150-151, 216, 359, 377-379, 383-385, 432-435
apps/evm/src/types/index.ts 100% 100% 100% 100%
apps/evm/src/utilities/areTokensEqual.ts 100% 50% 100% 100%
apps/evm/src/utilities/convertMantissaToTokens.ts 96.29% 71.42% 100% 96.29% 1
apps/evm/src/utilities/convertTokensToMantissa.ts 100% 50% 100% 100%
apps/evm/src/utilities/findTokenByAddress.ts 88.88% 66.66% 100% 88.88% 2
apps/evm/src/utilities/index.ts 98.68% 0% 100% 98.68% 1
apps/evm/src/utilities/calculateCollateralWithdrawLimits/index.ts 98.59% 88.88% 100% 98.59% 1
apps/evm/src/utilities/formatTokensToReadableValue/index.ts 97.72% 95% 100% 97.72% 1
Generated in workflow #13831 for commit 274766e by the Vitest Coverage Report Action

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.

1 participant