Commit Graph

8 Commits

Author SHA1 Message Date
pezkuwichain 04e7eedd53 fix: update RPC endpoints to correct production URLs
- Relay Chain: wss://rpc.pezkuwichain.io
- Asset Hub: wss://asset-hub-rpc.pezkuwichain.io
- People Chain: wss://people-rpc.pezkuwichain.io
- Add Zagros testnet configuration
- Remove legacy staging/dev endpoints
- Fix port suffix in Edge Functions
2026-02-06 06:27:37 +03:00
pezkuwichain f4f50e7abf fix: fetch collators from parachains and restrict CORS to production domains
- NetworkStats now queries Asset Hub and People Chain for collator data
  instead of relay chain (where collatorSelection doesn't exist)
- Restrict Edge Functions CORS to app.pezkuwichain.io domains only
- Add Access-Control-Allow-Credentials header for secure cross-origin requests
2026-02-06 06:00:01 +03:00
pezkuwichain 9bb71c436b 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 6da3c5b88c 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 7636d46c7d 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 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 2d2b6cf0aa fix: resolve lint errors in Edge Functions 2025-12-12 00:49:24 +03:00
pezkuwichain 14f5e84d15 feat(p2p): implement OKX-style internal ledger escrow system
Phase 5 implementation - Internal Ledger Escrow (OKX Model):
- No blockchain transactions during P2P trades
- Blockchain tx only at deposit/withdraw
- Fast and fee-free P2P trading

Database:
- Add user_internal_balances table
- Add p2p_deposit_withdraw_requests table
- Add p2p_balance_transactions table
- Add lock_escrow_internal(), release_escrow_internal() functions
- Add process_deposit(), request_withdraw() functions

UI Components:
- Add InternalBalanceCard showing available/locked balances
- Add DepositModal for crypto deposits to P2P balance
- Add WithdrawModal for withdrawals from P2P balance
- Integrate balance card into P2PDashboard

Backend:
- Add process-withdrawal Edge Function
- Add verify-deposit Edge Function

Updated p2p-fiat.ts:
- createFiatOffer() uses internal balance lock
- confirmPaymentReceived() uses internal balance transfer
- Add internal balance management functions
2025-12-12 00:41:11 +03:00