Commit Graph

322 Commits

Author SHA1 Message Date
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 c8fcd262c8 feat: add support for all pool combinations (wHEZ-PEZ, PEZ-USDT, wHEZ-USDT) 2026-02-04 19:32:19 +03:00
pezkuwichain c24a133fab fix: fetch real pool price using assetConversionApi.quotePriceExactTokensForTokens 2026-02-04 19:23:13 +03:00
pezkuwichain 574ee52f3b fix: use XCM Location format for native token in liquidity operations 2026-02-04 19:16:51 +03:00
pezkuwichain 4c6f74285c fix: handle native token ID (-1) in display names and fix loading state 2026-02-04 19:02:37 +03:00
pezkuwichain 1124087267 fix: use assetHubApi instead of undefined api in DEX components 2026-02-04 18:38:22 +03:00
pezkuwichain 040bbb595c fix: use assetHubApi instead of undefined api in XCMBridgeSetupModal
The checkBridgeStatus function was being called with `api` which was not
defined in the component scope. Changed to use `assetHubApi` which is
properly imported from PezkuwiContext.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:18:05 +03:00
pezkuwichain 37f1dcf334 chore: clear CI cache and rebuild 2026-02-04 17:38:13 +03:00
pezkuwichain 9f2ca47af0 fix: force rebuild - DEX migration complete 2026-02-04 17:34:12 +03:00
pezkuwichain 4fdb423b95 chore: trigger rebuild to clear cache 2026-02-04 17:08:39 +03:00
pezkuwichain a1b4c469d4 fix: replace remaining api references with assetHubApi in XCMBridgeSetupModal 2026-02-04 16:18:32 +03:00
pezkuwichain 7bfa47edd0 fix: migrate remaining DEX components to Asset Hub API
- Update dex/AddLiquidityModal to use assetHubApi
- Update dex/PoolBrowser to use assetHubApi
- Update dex/SwapInterface to use assetHubApi
- Update dex/XCMBridgeSetupModal to use assetHubApi
- Fix all dependency array references
2026-02-04 15:04:25 +03:00
pezkuwichain 9b66f355f5 fix: migrate DEX components from Relay Chain to Asset Hub API
- Update PoolDashboard to use assetHubApi for pool discovery
- Update TokenSwap to use assetHubApi for swap operations
- Update AddLiquidityModal to use assetHubApi
- Update RemoveLiquidityModal (both versions) to use assetHubApi
- Use XCM Location format for pool queries (Native HEZ support)
- Fix all lint errors and dependency array warnings
2026-02-04 14:37:33 +03:00
pezkuwichain 4036ddc743 feat: add bidirectional wrap/unwrap for HEZ and wHEZ tokens
- Add tabs UI for switching between wrap (HEZ → wHEZ) and unwrap (wHEZ → HEZ)
- Display both Native HEZ and wHEZ balances
- Support tokenWrapper.wrap() and tokenWrapper.unwrap() transactions
- Show 1:1 ratio conversion preview
2026-02-04 14:21:34 +03:00
pezkuwichain c2f2de3bbb feat: add Native HEZ support for pool creation
assetConversion pallet requires pools to pair with Native token.

Changes:
- Added NATIVE_TOKEN_ID (-1) constant for relay chain HEZ
- Updated CreatePoolModal to use XCM location format for Native
- Pools can now be created: Native HEZ / PEZ, Native HEZ / wUSDT, etc.
- Fixed balance fetching for Native vs Asset tokens
2026-02-04 14:13:43 +03:00
pezkuwichain 15374dcf7b fix: use correct asset format for assetConversion pallet
assetConversion.createPool expects { Asset: id } format, not raw numbers.
This fixes pool creation on Asset Hub.
2026-02-04 14:05:42 +03:00
pezkuwichain c8846648ee fix: suppress API/INIT and REGISTRY warnings in production
Added warning suppression at main.tsx entry point to catch
Polkadot.js warnings before any API imports load.
2026-02-04 14:01:43 +03:00
pezkuwichain db381c803d fix: correct wHEZ asset ID from 0 to 2
tokenWrapper pallet on Asset Hub creates wHEZ as Asset ID 2, not 0.

Asset IDs on Asset Hub:
- Asset 1: PEZ
- Asset 2: wHEZ (via tokenWrapper)
- Asset 1000: wUSDT

Updated:
- shared/constants/index.ts: KNOWN_TOKENS
- shared/lib/wallet.ts: ASSET_IDS.WHEZ default
- AccountBalance.tsx: pool queries
- InitializeHezPoolModal.tsx: balance query
2026-02-04 13:52:47 +03:00
pezkuwichain c8fef32558 feat: migrate DEX modals to Asset Hub API
DEX pallets (tokenWrapper, assets, assetConversion) are deployed on
Asset Hub teyrchain, not on the relay chain. Updated all DEX modals
to use assetHubApi instead of relay chain api:

- InitializeHezPoolModal: HEZ → wHEZ wrapping via Asset Hub
- InitializeUsdtModal: wUSDT minting via Asset Hub
- CreatePoolModal: Pool creation via Asset Hub
- XCMConfigurationWizard: Steps 5-6 use Asset Hub API

Added pallet availability checks with user-friendly error messages.
2026-02-04 13:13:24 +03:00
pezkuwichain 69bbe946f3 chore: suppress noisy API warnings in production console 2026-02-04 12:47:40 +03:00
pezkuwichain baf91181b2 fix: add People Chain deps to AccountBalance useEffect for proper balance fetch 2026-02-04 12:40:16 +03:00
pezkuwichain f886e1935a fix: correct RPC endpoints - remove wrong :9944 port 2026-02-04 12:35:42 +03:00
pezkuwichain cbff238100 fix: add production fallback endpoints for blockchain connection
- Add VITE_NETWORK and endpoint env vars to CI/CD build
- Add Asset Hub and People Chain endpoints to build config
- Add hardcoded production fallbacks in PezkuwiContext
- Disable WebSocket real-time service (not deployed yet)
- Endpoints: rpc.pezkuwichain.io, mainnet, beta, asset-hub, people
2026-02-04 12:19:29 +03:00
pezkuwichain c3cd60afcb test: update mobile app snapshots for Feb 2026 2026-02-04 12:02:17 +03:00
pezkuwichain 948fe2e87a fix: resolve all lint errors for CI/CD workflow
- Remove unused supabase import from AppLayout.tsx
- Replace any types with proper type assertions in XCMTeleportModal.tsx
- Remove unused events parameter from signAndSend callback
- Fix any types in PezkuwiContext.tsx debug code
- Escape apostrophe in EmailVerification.tsx
- Remove unused ArrowDownRight import from AccountBalance.tsx
2026-02-04 12:00:48 +03:00
pezkuwichain 8f2b5c7136 feat: add XCM teleport and CI/CD deployment workflow
Features:
- Add XCMTeleportModal for cross-chain HEZ transfers
- Support Asset Hub and People Chain teleports
- Add "Fund Fees" button with user-friendly tooltips
- Use correct XCM V3 format with teyrchain junction

Fixes:
- Fix PEZ transfer to use Asset Hub API
- Silence unnecessary pallet availability warnings
- Fix transaction loading performance (10 blocks limit)
- Remove Supabase admin_roles dependency

CI/CD:
- Add auto-deploy to VPS on main branch push
- Add version bumping on deploy
- Upload build artifacts for deployment
2026-02-04 11:35:25 +03:00
pezkuwichain 006be3a28f fix: use price proxy to avoid CORS and rate limits 2026-02-04 09:42:37 +03:00
pezkuwichain 52fb020bf3 fix: query PEZ balance from Asset Hub and prevent localhost WebSocket errors
- Add Asset Hub API connection for PEZ token queries (Asset ID 1 is on Asset Hub)
- Update AccountBalance to fetch PEZ balance from Asset Hub instead of main chain
- WebSocket: Only try localhost endpoints when running locally, use production
  endpoint directly when on domain
2026-02-04 09:24:03 +03:00
pezkuwichain e08227772c fix: update escrow address to Treasury_3
- Update PLATFORM_ESCROW_ADDRESS in p2p-fiat.ts
- Update PLATFORM_WALLET in verify-deposit edge function
- Use controlled wallet for P2P deposits/withdrawals
2026-02-03 16:50:56 +03:00
pezkuwichain 3c89577d55 chore: update @pezkuwi packages to latest stable versions
- Update all @pezkuwi packages in web, mobile, and backend
- API 16.5.36, Common 14.0.25, WASM 7.5.17
2026-02-01 22:50:51 +03:00
pezkuwichain 50331af32d feat: add CoinGecko price logic with DOT-based fallback
- HEZ price: CoinGecko direct > DOT/3 > DEX pool
- PEZ price: CoinGecko direct > DOT/10 > DEX pool
- Added AuthorizeCall signed extension for blockchain connection
- Updated @pezkuwi packages to 16.5.22 and 14.0.13
2026-01-31 18:56:28 +03:00
pezkuwichain 8b1b1f091d fix: update @pezkuwi/api packages to 16.5.22 2026-01-31 18:27:51 +03:00
pezkuwichain 1b2c442f3a chore: update @pezkuwi packages to latest versions
- @pezkuwi/api: 16.5.18 (mainnet genesis hash fix)
- @pezkuwi/keyring: 14.0.13
- @pezkuwi/util: 14.0.13
- @pezkuwi/util-crypto: 14.0.13
- All other @pezkuwi packages updated accordingly
2026-01-31 08:18:52 +03:00
pezkuwichain dd1e0dc294 feat: add Telegram mini app connect for P2P access 2026-01-29 21:27:13 +03:00
pezkuwichain 3879780c14 feat: smart extension detection - only redirect to Chrome Web Store if not installed 2026-01-29 15:09:28 +03:00
pezkuwichain 9570465435 fix: update vite and vite-plugin-node-polyfills to fix moderate vulnerabilities 2026-01-29 03:59:28 +03:00
pezkuwichain 131d098a71 fix: remove telegram import from App.tsx 2026-01-29 03:47:40 +03:00
pezkuwichain 126bda0fdc fix: remove telegram module (moved to separate repo) and fix ESLint
- Remove src/telegram/* (moved to pezkuwi-telegram-miniapp repo)
- Fix unused variable in process-withdraw Edge Function
2026-01-29 03:45:01 +03:00
pezkuwichain f23eee2fb9 feat(p2p): OKX-level security upgrade with Edge Functions
- Add process-withdraw Edge Function for blockchain withdrawals
- Update verify-deposit Edge Function with @pezkuwi/api
- Add withdrawal limits (daily/monthly) and fee system
- Add hot wallet configuration with production address
- Add admin roles for dispute resolution
- Add COMBINED SQL migration with full P2P system
- Encrypt payment details with AES-256-GCM
- Prevent TX hash reuse with UNIQUE constraint
2026-01-29 03:12:02 +03:00
pezkuwichain 6c922bcf34 fix: update Supabase project URL to correct DKSapp instance 2026-01-28 10:03:33 +03:00
pezkuwichain 3e76c9c95f feat(telegram): redesign all sections with production-quality UI
- Rewrite AnnouncementsSection with shadcn/ui Card components
- Rewrite ForumSection with proper thread/reply UI
- Rewrite APKSection with version history and download features
- All sections now use consistent design patterns
- Turkish localization for all UI text
- Bottom navigation instead of sidebar
- Remove obsolete sub-components (AnnouncementCard, ThreadCard, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 23:24:41 +03:00
pezkuwichain bf85df1651 feat(telegram): add Telegram Mini App for Pezkuwichain
- Add @twa-dev/sdk dependency for Telegram WebApp integration
- Create useTelegram hook for Telegram SDK integration (haptics, popups, etc.)
- Create usePezkuwiApi hook for blockchain API connection
- Add Discord-like Sidebar with 5 sections navigation
- Add Announcements section with like/dislike reactions
- Add Forum section with thread creation and replies
- Add Rewards section with referral program and epoch claims
- Add APK section for Pezwallet download with changelog
- Add Wallet section with balance, staking info, and transactions
- Create main TelegramApp component with routing
- Add /telegram route to App.tsx

UI Structure:
- Left: Discord-style icon sidebar (Announcements, Forum, Rewards, APK, Wallet)
- Right: Active section content area
- Mobile-first responsive design with Telegram theme integration

Integrations:
- Uses existing shared/lib functions for referral, staking, scores
- Supports Telegram startParam for referral codes
- Haptic feedback for native Telegram experience
- Telegram Main/Back button integration
2026-01-26 17:42:35 +03:00
pezkuwichain 48b51828fa fix: Resolve mobile app crash with import.meta and babel config
- Add guard for import.meta in endpoints.ts for React Native compatibility
- Add jsEngine: jsc to app.json to match gradle.properties
- Add @babel/plugin-transform-class-static-block for @pezkuwi/types-codec
2026-01-20 01:28:56 +03:00
pezkuwichain f9bbabd215 feat(mobile): Add semantic versioning with standard-version
- Add standard-version for automated version bumping
- Create .versionrc with custom configuration for app.json
- Add version-updater.cjs script for Expo version syncing
- Add version bump scripts (release, release:patch, release:minor, release:major)
- Initialize CHANGELOG.md with v1.0.0 release notes
- Add iOS buildNumber and Android versionCode for app store releases
- Update .gitignore to allow CHANGELOG.md

This establishes proper engineering practices for version management.
2026-01-19 16:00:43 +03:00
pezkuwichain c260da18b1 fix: Remove workspace config, fix test suite, update snapshots
- Remove root /home/mamostehp/package.json workspace config
- Each project now independent (aligned with CI workflow)
- Add SafeAreaProvider mock to jest setup
- Add __DEV__ global for React Native tests
- Update 4 snapshots for SafeAreaView changes
- All 29 test suites pass (122 tests)
2026-01-19 15:26:47 +03:00
pezkuwichain 0feeefe40c docs: Update README for new project structure 2026-01-19 14:53:35 +03:00
pezkuwichain 7c5887598f refactor: Move pezkuwi-sdk-ui to separate repo, add postinstall for mobile
- Remove pezkuwi-sdk-ui from pwap (now at /home/mamostehp/pezkuwi-sdk-ui)
- Add scripts/fix-pezkuwi-packages.cjs for @pezkuwi package path fixes
- Add postinstall hook to mobile package.json
- Update metro.config.cjs documentation
- Update backend @pezkuwi/api version to 16.5.11

pezkuwi-sdk-ui is now a standalone repo at:
https://github.com/pezkuwichain/pezkuwi-sdk-ui

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:44:52 +03:00
pezkuwichain 6bc9d68e84 chore: Fix linting errors and update shared libs for mobile build 2026-01-19 03:35:33 +03:00
pezkuwichain 83f55bcf03 chore: Fix all linting errors for green build 2026-01-19 03:31:23 +03:00
pezkuwichain 8ddbe8d95a fix: Import PezkuwiWebView in screens to resolve build errors 2026-01-19 03:20:39 +03:00