Skip to content

feat(pool): align UI to Figma — HUB deposit flow, position manage tabs, wallet balances#881

Draft
AntonAndell wants to merge 3 commits intofeat/sdk-dexfrom
feat/pool-page
Draft

feat(pool): align UI to Figma — HUB deposit flow, position manage tabs, wallet balances#881
AntonAndell wants to merge 3 commits intofeat/sdk-dexfrom
feat/pool-page

Conversation

@AntonAndell
Copy link
Copy Markdown
Contributor

Summary

  • HUB deposit abstraction: supply dialog now routes users through ERC20 approve + HUB deposit steps (DEPOSIT_TOKEN0 → DEPOSIT_TOKEN1) before the existing APPROVE + SUPPLY steps; amount already on HUB is subtracted so only the delta is deposited
  • xSODA zero-balance path: when the user has no xSODA in their spoke wallet, the deposit step shows a "Stake SODA to get xSODA" link to /stake instead of deposit buttons
  • Spoke wallet balances (usePoolContext): added useXBalances for spoke-chain ERC20 balances; continue-button now uses these (not HUB balances) for "Buy SODA" / "Insufficient balance" checks
  • Default ±5% price range: price chart auto-sets min/max on first load when currentPrice > 0
  • Position card redesign (Figma): always-visible layout — overlapping token badges, USD value + green earnings, chain name, horizontal range bar with current-price dot, inline Claim / Manage buttons
  • Position manage modal tabs: Add liquidity / Withdraw / Claim; defaultTab prop ensures clicking "Claim" on a card opens directly to the Claim tab
  • Token input UX: symbol hidden while typing; MAX button hidden when at max balance
  • New components: DepositTokenStep, PositionCardWithData, RangeHandle, TickDistribution, usePoolContext, useTickLiquidityDistribution

Test plan

  • Price chart loads → min/max auto-set to ±5% of current price
  • Wallet with no SODA → "Buy SODA" button shown
  • Wallet with SODA but nothing on HUB → Continue → DEPOSIT_TOKEN0 step → approve + deposit → DEPOSIT_TOKEN1 or APPROVE
  • Wallet with partial HUB balance → only the delta amount is deposited
  • Token1 (xSODA) with zero wallet balance → shows "Stake SODA" link
  • Supply review step shows HUB balance status icons (green/yellow) per token
  • Position cards render without chevron expand; inline Claim/Manage buttons visible
  • Clicking Claim on position card opens manage modal on Claim tab
  • Manage modal Add tab → "Add liquidity" closes modal and opens supply dialog with position preselected
  • TypeScript: pnpm exec tsc --noEmit in apps/web — no new errors

🤖 Generated with Claude Code

AntonAndell and others added 3 commits February 24, 2026 11:11
Complete concentrated liquidity pool page with:
- Token pair selector, network picker, price chart (lightweight-charts)
- Range selector (min/max price), token input pair with balances
- Supply dialog with 3-step flow (info → review → supply)
- Position overview with expandable cards and manage modal
- Real backend API integration via useBackendAMMNftPositions
- AMM NFT positions endpoint in SDK BackendApiService
- Pool navigation tab and store provider

Mock service layer for supply/withdraw/claim (to be replaced with SDK).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Copy stake page, stake-icon, route-tab-item, utils from main
- Resolve merge conflicts in layout, icons, tab-icon, route-tabs, package.json, constants
- Use workspace:* for all @sodax/* packages
- Use public RPCs for dev mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…age tabs

- Add HUB deposit abstraction: DEPOSIT_TOKEN0 / DEPOSIT_TOKEN1 steps in supply
  dialog route users through ERC20 approve + HUB deposit before supplying
- New DepositTokenStep component handles approve->deposit per-token; xSODA
  zero-balance shows "Stake SODA to get xSODA" link to /stake
- Add usePoolContext hook exposing spoke wallet balances (useXBalances) and
  spokeAssets for correct "Buy SODA" / "Insufficient balance" checks
- Default +/-5% price range on price chart load (currentPrice * 0.95 / 1.05)
- Supply review step shows HUB balance vs needed per token with status icons
- Position card redesigned to Figma: always-visible layout with overlapping
  token badges, USD value, earnings, range bar, inline Claim/Manage buttons
- Position manage modal reworked with Add / Withdraw / Claim tabs; defaultTab
  prop routes claim-triggered opens directly to Claim tab
- Token input hides symbol when typing; MAX button hidden at max balance
- Add tick-distribution and range-handle chart sub-components
- Add useTickLiquidityDistribution hook to dapp-kit
- Add xsoda.png token icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
sodax-demo Building Building Preview, Comment Feb 25, 2026 10:17am
sodax-web Building Building Preview, Comment Feb 25, 2026 10:17am

Request Review

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