Commit Graph

8 Commits

Author SHA1 Message Date
pezkuwichain 2ba766ff8d fix: correct XCM location parsing for pool discovery
- Handle lowercase keys from chain (x2, generalIndex, here)
- Fix pool key args structure (tuple inside array)
- Native token now correctly identified as -1
2026-02-05 00:07:54 +03:00
pezkuwichain 2bfbbe6d1a fix: resolve DEX pool issues with XCM Location format and slippage calculation
- 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
2026-02-04 20:13:26 +03:00
pezkuwichain 6bc9d68e84 chore: Fix linting errors and update shared libs for mobile build 2026-01-19 03:35:33 +03:00
pezkuwichain 1325767529 fix: update @pezkuwi packages and resolve alias conflicts
- Update @pezkuwi/api to 16.5.6, extension-dapp to 0.62.11
- Add npm overrides to fix internal dependency version mismatches
- Rename @pezkuwi/types alias to @local/types to prevent collision with npm package
- Update shared/utils/dex.ts import to use @local/types/dex
2026-01-07 03:01:54 +03:00
pezkuwichain 1295c36241 Rebrand: polkadot → pezkuwi build fixes
- Fixed TypeScript type assertion issues
- Updated imports from api-augment/substrate to api-augment/bizinikiwi
- Fixed imgConvert.mjs header and imports
- Added @ts-expect-error for runtime-converted types
- Fixed all @polkadot copyright headers to @pezkuwi
2026-01-07 02:32:54 +03:00
pezkuwichain 51028e6344 feat: Phase 3 - P2P Fiat Trading System (Production-Ready)
Major Updates:
- Footer improvements: English-only text, proper alignment, professional icons
- DEX Pool implementation with AMM-based token swapping
- Enhanced dashboard with DashboardContext for centralized data
- New Citizens section and government entrance page

DEX Features:
- Token swap interface with price impact calculation
- Pool management (add/remove liquidity)
- Founder-only admin panel for pool creation
- HEZ wrapping functionality (wHEZ)
- Multiple token support (HEZ, wHEZ, USDT, USDC, BTC)

UI/UX Improvements:
- Footer: Removed distracting images, added Mail icons, English text
- Footer: Proper left alignment for all sections
- DEX Dashboard: Founder access badge, responsive tabs
- Back to home navigation in DEX interface

Component Structure:
- src/components/dex/: DEX-specific components
- src/components/admin/: Admin panel components
- src/components/dashboard/: Dashboard widgets
- src/contexts/DashboardContext.tsx: Centralized dashboard state

Shared Libraries:
- shared/lib/kyc.ts: KYC status management
- shared/lib/citizenship-workflow.ts: Citizenship flow
- shared/utils/dex.ts: DEX calculations and utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 05:44:48 +03:00
pezkuwichain 1e8682739e Fix frontend: resolve imports, add missing functions, configure Vite properly 2025-11-15 11:10:31 +03:00
Claude 7b95b8a409 Centralize common code in shared folder
This commit reorganizes the codebase to eliminate duplication between web and mobile frontends by moving all commonly used files to the shared folder.

Changes:
- Moved lib files to shared/lib/:
  * wallet.ts, staking.ts, tiki.ts, identity.ts
  * multisig.ts, usdt.ts, scores.ts, citizenship-workflow.ts

- Moved utils to shared/utils/:
  * auth.ts, dex.ts
  * Created format.ts (extracted formatNumber from web utils)

- Created shared/theme/:
  * colors.ts (Kurdistan and App color definitions)

- Updated web configuration:
  * Added @pezkuwi/* path aliases in tsconfig.json and vite.config.ts
  * Updated all imports to use @pezkuwi/lib/*, @pezkuwi/utils/*, @pezkuwi/theme/*
  * Removed duplicate files from web/src/lib and web/src/utils

- Updated mobile configuration:
  * Added @pezkuwi/* path aliases in tsconfig.json
  * Updated theme/colors.ts to re-export from shared
  * Mobile already uses relative imports to shared (no changes needed)

Architecture Benefits:
- Single source of truth for common code
- No duplication between frontends
- Easier maintenance and consistency
- Clear separation of shared vs platform-specific code

Web-specific files kept:
- web/src/lib/supabase.ts
- web/src/lib/utils.ts (cn function for Tailwind, re-exports formatNumber from shared)

All imports updated and tested. Both web and mobile now use the centralized shared folder.
2025-11-14 22:46:39 +00:00