- Add LP_TOKENS definition in shared/types/dex.ts
- Fetch LP token balances from poolAssets pallet
- Add HEZ-PEZ-LP and HEZ-USDT-LP to TokenBalances
- Add lp_token_512.png logo
- Fix PoolDashboard reserve fetching (was hardcoded to 0)
- Fix slippage calculation bug in AddLiquidityModal
- Add XCM Location format support for native token (-1) in all liquidity modals
- Update KNOWN_TOKENS with correct wUSDT asset ID (1000) and add NATIVE_TOKEN_ID constant
- Implement dynamic pool discovery in fetchPools() using XCM Location parsing
- Update fetchUserLPPositions() to use correct LP token ID from chain
- Add formatAssetLocation() helper to shared/utils/dex.ts
Centralized common code into shared/ folder to eliminate duplication and
improve maintainability across all three frontend projects (web, mobile,
pezkuwi-sdk-ui).
Changes:
- Added token types and constants to shared/types/tokens.ts
- TokenInfo, PoolInfo, SwapQuote, and other DEX types
- KNOWN_TOKENS with HEZ, PEZ, wUSDT definitions
- Token logos (🟡🟣💵)
- Added Kurdistan color palette to shared/constants/
- Kesk, Sor, Zer, Spî, Reş color definitions
- Added TOKEN_DISPLAY_SYMBOLS mapping (USDT vs wUSDT)
- Updated blockchain configuration in shared/blockchain/polkadot.ts
- Added beta testnet endpoint (wss://beta-rpc.pezkuwi.art)
- Defined DEFAULT_ENDPOINT constant
- Moved i18n to shared/i18n/
- Centralized translation files for 6 languages (EN, TR, KMR, CKB, AR, FA)
- Added LANGUAGES configuration with RTL support
- Created isRTL() helper function
- Updated web and mobile to import from shared
- web/src/types/dex.ts now re-exports from shared
- web/src/contexts/PolkadotContext.tsx uses DEFAULT_ENDPOINT
- mobile/src/i18n/index.ts uses shared translations
- mobile/src/contexts/PolkadotContext.tsx uses DEFAULT_ENDPOINT
- Updated shared/README.md with comprehensive documentation
This architecture reduces code duplication and ensures consistency across
all frontend projects.
Restructured the project to support multiple frontend applications:
- Move web app to web/ directory
- Create pezkuwi-sdk-ui/ for Polkadot SDK clone (planned)
- Create mobile/ directory for mobile app development
- Add shared/ directory with common utilities, types, and blockchain code
- Update README.md with comprehensive documentation
- Remove obsolete DKSweb/ directory
This monorepo structure enables better code sharing and organized
development across web, mobile, and SDK UI projects.