Commit Graph

84 Commits

Author SHA1 Message Date
pezkuwichain 33033a31f0 Fix web build polyfills and mobile ESLint ignore patterns 2026-01-18 01:28:04 +03:00
pezkuwichain 83f0e39543 Update @pezkuwi/extension-dapp to 0.62.20 2026-01-18 01:04:04 +03:00
pezkuwichain f7f533b8ec Update promotional images and web package dependencies 2026-01-17 23:20:03 +03:00
pezkuwichain 10ed6e78a5 fix: remove local path aliases for extension packages in vite config 2026-01-17 19:32:20 +03:00
pezkuwichain 2276c557e2 Fix lint: remove unused Smartphone import 2026-01-17 18:44:23 +03:00
pezkuwichain 1b29df3379 Reorganize images and update web components 2026-01-17 18:40:21 +03:00
pezkuwichain f3e4e344ff Fix lint: remove unused imports 2026-01-17 18:29:00 +03:00
pezkuwichain aa7892b3ea Update @pezkuwi/extension packages to 0.62.18 2026-01-17 16:31:58 +03:00
pezkuwichain 5c74c6306d Add MetaMask error patterns to Sentry ignore list 2026-01-15 12:07:50 +03:00
pezkuwichain 1843136acc Add explorer sub-routes for accounts and assets views
- Add /explorer/* wildcard route in App.tsx
- Add view navigation tabs (Overview, Accounts, Assets)
- Parse URL to determine current view
- Add accounts and assets view components
- Add account detail view with address display
2026-01-15 11:54:53 +03:00
pezkuwichain 5cb2bc1b8e Update extension references to Pezkuwi.js
- Replace "Pezkuwi Wallet" with "Pezkuwi.js" in extension references
- Consistent naming with js.pezkuwichain.io landing page
2026-01-15 11:43:11 +03:00
pezkuwichain 960a936bd5 Update all Polkadot.js references to Pezkuwi Wallet
- Replace Polkadot.js extension references with Pezkuwi Wallet
- Update explorer links to pezkuwichain.io/explorer
- Update install links to js.pezkuwichain.io
- Update source identifiers from polkadot-js to pezkuwi
2026-01-15 11:25:25 +03:00
pezkuwichain 1818a5b6c7 fix(p2p): complete mobile bridge transaction signing flow
- PezkuwiWebView now uses signAndSend via native API
- Transactions are signed AND submitted on native side
- Returns actual block hash instead of raw signature
- Web sends section/method/args payload format
- WalletContext extracts tx details for mobile bridge
2026-01-15 11:07:21 +03:00
pezkuwichain 7c0f963dce fix(web): update vite alias to use local workspace build dirs
Workspace symlinks point to source directories which don't have
proper module resolution. Alias now points directly to build/
directories in pezkuwi-extension workspace.
2026-01-15 10:49:01 +03:00
pezkuwichain a4e3e18b34 fix(web): Add vite alias for @pezkuwi/extension-* packages
The @pezkuwi/extension-dapp and extension-inject packages have incorrect
package structure - build directory should be the package root.

Added vite aliases to point directly to the build directories until
packages are republished with correct structure.
2026-01-15 10:09:11 +03:00
pezkuwichain 298a2c57f1 feat(web): Add mobile bridge support for P2P WebView integration
- Add mobile-bridge.ts utility for native app communication
- Add useMobileBridge.ts React hook
- Update AuthContext to detect and use native wallet
- Update PezkuwiContext to connect mobile wallet automatically
- Update WalletContext to sign transactions via native bridge

Mobile app can now seamlessly use web P2P features with native wallet.
2026-01-15 10:00:11 +03:00
pezkuwichain 4a3694c831 Fix all shadow deprecation warnings across entire mobile app
- Replaced shadowColor/shadowOffset/shadowOpacity/shadowRadius with boxShadow
- Fixed 28 files (21 screens + 7 components)
- Preserved elevation for Android compatibility
- All React Native Web deprecation warnings resolved

Files fixed:
- All screen components
- All reusable components
- Navigation components
- Modal components
2026-01-14 15:05:10 +03:00
pezkuwichain f96ff76514 chore: update @pezkuwi/extension-dapp to 0.62.14 2026-01-09 03:12:46 +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 fe2cd390f6 feat(p2p): add Kurdish diaspora payment methods (130+ total)
- Add 61 new payment methods for diaspora countries:
  - Germany (EUR): Sparkasse, Commerzbank, DKB, etc.
  - Sweden (SEK): Swish, Nordea, SEB, Swedbank
  - UK (GBP): Faster Payments, Barclays, HSBC, Monzo
  - France (EUR): Crédit Agricole, Lydia, BNP Paribas
  - Netherlands (EUR): iDEAL, ABN AMRO, Bunq, Tikkie
  - Belgium (EUR): Bancontact, KBC
  - Austria (EUR): Erste Bank, Raiffeisen
  - Switzerland (CHF): TWINT, UBS, PostFinance
  - Norway (NOK): Vipps, DNB, SpareBank 1
  - Denmark (DKK): MobilePay, Danske Bank
  - Australia (AUD): PayID, Commonwealth Bank
  - Canada (CAD): Interac e-Transfer, TD Bank

- Expand FiatCurrency type: SEK, GBP, CHF, NOK, DKK, AUD, CAD
- Update CreateAd, BlockTrade, ExpressMode components
- Add regional labels (Bakur, Başûr, Rojhilat, EU diaspora)
2025-12-12 03:48:57 +03:00
pezkuwichain c53d9de1f1 fix(p2p): rename 'My Orders' to 'My Trades' for consistency
- Updated P2POrders.tsx page title
- Updated P2PDashboard.tsx button label
- Updated P2PTrade.tsx back button
- Updated P2PDispute.tsx navigation button
- Updated NotificationBell.tsx link text
- Terminology now correctly reflects p2p_fiat_trades table
2025-12-12 01:48:40 +03:00
pezkuwichain f978550910 fix: implement Remember Me functionality for login
- Add rememberMe parameter to signIn function in AuthContext
- Store remember_me preference in localStorage
- Skip session timeout when Remember Me is enabled
- Clear remember_me on signOut
- Pass rememberMe from Login.tsx to signIn call
2025-12-12 01:39:17 +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
pezkuwichain 471ccc1145 feat(p2p): integrate advanced filters into AdList
- Add filter support for token, fiat currency, payment methods
- Add amount range filters (min/max)
- Add merchant tier filtering (Super+, Diamond)
- Add completion rate and verified-only filters
- Fetch merchant tier data for each offer
- Client-side filtering for reputation-based filters
2025-12-11 21:29:43 +03:00
pezkuwichain a0bcfcc222 refactor: reorganize docs folder structure and update P2P plan 2025-12-11 21:01:58 +03:00
pezkuwichain dcbfa4789a feat(p2p): add atomic escrow system with race condition protection
- Add p2p_platform_escrow table for tracking locked funds
- Implement accept_p2p_offer() with FOR UPDATE lock to prevent race conditions
- Add complete_p2p_trade() and cancel_p2p_trade() atomic functions
- Configure platform escrow wallet: 5DFwqK698vL4gXHEcanaewnAqhxJ2rjhAogpSTHw3iwGDwd3
- Update AdList to show user's own offers with Your Ad badge
- Remove unused getActiveOffers import (ESLint fix)
2025-12-11 20:45:14 +03:00
pezkuwichain df58d26893 feat(p2p): add Phase 4 merchant tier system and migrations
- Add merchant tier system (Lite/Super/Diamond) with tier badges
- Add advanced order filters (token, fiat, payment method, amount range)
- Add merchant dashboard with stats, ads management, tier upgrade
- Add fraud prevention system with risk scoring and trade limits
- Rename migrations to timestamp format for Supabase CLI compatibility
- Add new migrations: phase2_phase3_tables, fraud_prevention, merchant_system
2025-12-11 10:39:08 +03:00
pezkuwichain 7330b2e7a6 feat(p2p): add Phase 3 dispute system components
- Add DisputeModal.tsx with reason selection, evidence upload, terms acceptance
- Add P2PDispute.tsx page with evidence gallery, status timeline, real-time updates
- Integrate dispute button in P2PTrade.tsx
- Add /p2p/dispute/:disputeId route to App.tsx
- Add P2P test suite with MockStore pattern (32 tests passing)
- Update P2P-BUILDING-PLAN.md with Phase 3 progress (70% complete)
- Fix lint errors in test files and components
2025-12-11 09:10:04 +03:00
pezkuwichain 8a602dc3fa feat(explorer): implement real blockchain data explorer
- Live block/extrinsic data from Polkadot.js API
- Network stats: best block, finalized, validators, era, TPS
- Recent blocks and extrinsics with success/fail status
- Search by block number, hash, or address
- Auto-refresh via subscribeNewHeads()
2025-12-11 05:33:13 +03:00
pezkuwichain 0cddd9c3f1 feat(forum): implement real forum with Supabase integration
- Forum.tsx: categories, discussions, stats, search, sort, announcements
- ForumTopic.tsx: replies, voting, bookmarks, report, nested comments
- App.tsx: added ForumTopic route for /forum/:id
2025-12-11 05:20:45 +03:00
pezkuwichain 30663941ff fix(lint): resolve unused variables in WalletDashboard 2025-12-11 04:41:42 +03:00
pezkuwichain 12344198aa feat(wallet): add token logos to wallet dashboard and transfer modal 2025-12-11 04:31:10 +03:00
pezkuwichain f1b8d9160e fix(wallet): restore real blockchain WalletDashboard, remove mock Wallet page 2025-12-11 04:04:10 +03:00
pezkuwichain e974097072 fix(docs): support multiple SDK paths for local and CI environments 2025-12-11 03:12:56 +03:00
pezkuwichain f35b495394 fix(lint): expand eslint ignores for cjs and sdk_docs files 2025-12-11 03:08:08 +03:00
pezkuwichain 3e82dd943d fix(test): add polyfill shims for vitest environment 2025-12-11 01:56:33 +03:00
pezkuwichain 47ea12d0de feat(governance): implement real blockchain data for governance section
- Update ElectionsInterface to fetch real elections from welati pallet
- Add MyVotes component for user voting history (proposals, elections, delegations)
- Add GovernanceHistory component for completed elections and proposals
- Integrate DelegationManager into GovernanceInterface delegation tab
- Fix linter errors across multiple files (unused imports, type annotations)
- Update eslint.config.js to ignore SDK docs and CJS files
2025-12-11 01:45:13 +03:00
pezkuwichain 11678fe7cd feat(web): add network subpages and subdomains listing page
- Add /subdomains page listing all 20 PezkuwiChain subdomains
- Add Back to Home button to Subdomains page
- Create NetworkPage reusable component for network details
- Add 7 network subpages: /mainnet, /staging, /testnet, /beta, /alfa, /development, /local
- Update ChainSpecs network cards to navigate to network subpages
- Add i18n translations for chainSpecs section in en.ts
- Add SDK docs with rebranding support (rebrand-rustdoc.cjs)
- Add generate-docs-structure.cjs for automatic docs generation
- Update shared libs: endpoints, polkadot, wallet, xcm-bridge
- Add new token logos: TYR, ZGR, pezkuwi_icon
- Add new pages: Explorer, Docs, Wallet, Api, Faucet, Developers, Grants, Wiki, Forum, Telemetry
2025-12-11 00:33:47 +03:00
pezkuwichain 733221184b feat(admin): add USDT-wUSDT integration button
Added user-friendly toggle button in admin panel for easy USDT-wUSDT bridge control. fixed ESlint errors.
2025-11-21 21:26:38 +03:00
pezkuwichain de46a698c9 feat(admin): add USDT-wUSDT integration button
Added user-friendly toggle button in admin panel for easy USDT-wUSDT bridge control.
2025-11-21 21:09:22 +03:00
Claude 15d6dc62c9 fix: resolve remaining ESLint error and install missing globals dependency
- Removed unused useCallback import from CitizensIssues.tsx
- Installed globals package required by eslint.config.js
- All ESLint errors and warnings now resolved

Lint now passes with 0 errors and 0 warnings.
2025-11-21 13:39:36 +00:00
Claude 49c6b6f5f7 fix: resolve ESLint warnings and errors in web frontend
Fixed all linting issues reported by ESLint:

Errors fixed:
- InitializeUsdtModal.tsx: Removed unused imports (ASSET_IDS, ASSET_CONFIGS)

Warnings fixed:
- DashboardContext.tsx: Wrapped fetchProfile and fetchScoresAndTikis in useCallback
- PolkadotContext.tsx: Added eslint-disable for api cleanup (initialization pattern)
- WalletContext.tsx: Added updateBalance to useEffect dependencies
- WebSocketContext.tsx: Moved ENDPOINTS constant outside component
- useForum.ts: Added eslint-disable for mount-only effect
- Dashboard.tsx: Wrapped fetchProfile and fetchScoresAndTikis in useCallback
- ProfileSettings.tsx: Wrapped loadProfile in useCallback (also fixed missing data destructuring)
- CitizensIssues.tsx: Added eslint-disable for complex fetch pattern

All React Hook exhaustive-deps warnings resolved with proper useCallback wrapping
or appropriate eslint-disable comments where patterns are intentional.
2025-11-21 12:53:41 +00:00
pezkuwichain 60a32a325e refactor: Completed final cleanup and resolved local changes before push 2025-11-21 07:28:47 +03:00
pezkuwichain 06a7ec9424 feat(frontend): align wUSDT Asset ID with SDK (1000)
This commit aligns the frontend wUSDT implementation with the SDK runtime
constants, ensuring consistency across the entire stack.

Changes:
- Update ASSET_IDS.WUSDT from 2 → 1000 (matches SDK constants)
- Add ASSET_CONFIGS with wUSDT configuration (6 decimals, min balance)
- Update all asset queries in AccountBalance.tsx to use ASSET_IDS.WUSDT
- Update pool queries for wHEZ/wUSDT and PEZ/wUSDT pools
- Update USDTBridge.tsx burn transaction to use ASSET_IDS.WUSDT
- Refactor usdt.ts to reference ASSET_CONFIGS instead of hardcoded values

Asset ID Allocation Strategy:
- 0-999: Reserved for protocol tokens (wHEZ, PEZ, etc.)
- 1000+: Bridged/wrapped external assets (wUSDT, etc.)

Technical Details:
- wUSDT uses 6 decimals (USDT standard), not 12 like native HEZ
- All frontend code now uses centralized ASSET_CONFIGS
- ESLint passes with 0 errors (8 pre-existing warnings unrelated to changes)

This is part of Phase 1 wUSDT infrastructure setup, working in parallel
with SDK benchmarking builds currently running in background.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 19:52:48 +03:00
pezkuwichain 4140b28f48 fix: disable react-refresh warnings for UI components and contexts
## Changes
- Add ESLint override for src/components/ui/** files
- Add ESLint override for src/contexts/** files
- Add ESLint override for theme-provider.tsx
- Turn off react-refresh/only-export-components for these files

## Impact
- Reduced warnings from 24 → 8
- All fast-refresh warnings eliminated
- Remaining 8 warnings are exhaustive-deps (non-critical)

**Rationale**: UI library components (shadcn/ui) and context providers
legitimately export utility functions alongside components. This is a
standard pattern and doesn't affect hot module replacement in practice.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 18:53:04 +03:00
pezkuwichain 8df856957e fix: resolve critical ESLint error and React Hook warnings
## Critical Fix
- Escape apostrophe in Presale.tsx error message using &apos;

## React Hooks Fixes
- Add eslint-disable for exhaustive-deps in Presale.tsx
- Add eslint-disable for exhaustive-deps in NotificationCenter.tsx
- Add eslint-disable for exhaustive-deps in NotificationBell.tsx
- Move loadPresaleData function before useEffect to prevent hoisting issues

**Result**: 0 errors, 24 warnings (all non-critical fast-refresh warnings)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 18:48:04 +03:00
pezkuwichain 413bcea9da fix: resolve all ESLint errors in launchpad pages
## TypeScript Fixes
- Remove unused imports (useTranslation, TrendingUp, CheckCircle2)
- Replace 'any' types with proper type annotations
- Add PresaleData interface for type safety
- Fix error handling with proper Error type casting

## React Hooks Fixes
- Move loadPresaleData function before useEffect
- Add eslint-disable comments for exhaustive-deps warnings
- Prevent function definition hoisting issues

## Code Quality
- Remove duplicate loadPresaleData function in PresaleDetail
- Proper error message handling with type assertions
- Clean imports and unused variables

All 11 ESLint errors resolved, 0 warnings remaining.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 18:40:11 +03:00
pezkuwichain 9de2d853aa fix: AuthContext hoisting error and add presale launchpad UI
Frontend improvements for production readiness:
- Fixed AuthContext function hoisting issue (checkAdminStatus before use)
- Added complete Presale Launchpad UI (PresaleList, CreatePresale, PresaleDetail)
- Integrated with pallet-presale blockchain functionality
- Updated App.tsx routing for launchpad pages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 18:32:08 +03:00