Commit Graph

231 Commits

Author SHA1 Message Date
pezkuwichain 80d8bbbcb1 fix: universal getSigner helper for WalletConnect + extension signing
Replace all web3FromAddress calls with getSigner() that auto-detects
walletSource and uses WC signer or extension signer accordingly.
This fixes all signing operations when connected via WalletConnect.
2026-02-23 07:01:18 +03:00
pezkuwichain bcee7c2a7d fix: mobile UI improvements and web3Enable for WalletConnect signing
- Compact stat cards on mobile (Dashboard, Referral, P2P)
- Hide unnecessary sections on mobile (Recent Activity, NFTs, Score Calculation, Liquidity Pools, Recent Swaps)
- Fix back arrow overlapping title on all pages
- Swap Settings and Governance nav positions for better mobile dropdown
- Add back arrow to Presale page
- Add web3Enable before all web3FromAddress calls for WalletConnect compatibility
- Fix citizenship authentication signing with WalletConnect
2026-02-23 06:22:12 +03:00
pezkuwichain 7107f18ea6 debug: add WalletConnect debug logging to diagnose timeout 2026-02-23 00:57:38 +03:00
pezkuwichain 9897d6268e fix: resolve remaining lint warnings (console.log and missing deps) 2026-02-23 00:28:32 +03:00
pezkuwichain cbbea8a5dc fix: resolve all lint warnings in mobile and web apps 2026-02-23 00:24:17 +03:00
pezkuwichain d7278956fa fix: WalletConnect race conditions, session validation and timeout handling 2026-02-23 00:16:34 +03:00
pezkuwichain 87f6d0471e fix: only init WalletConnect when a saved session exists 2026-02-22 22:31:52 +03:00
pezkuwichain e593f5e4bb fix: use deep link instead of QR on mobile, show extension only on desktop 2026-02-22 22:16:55 +03:00
pezkuwichain d6e59b316b fix: show only mobile wallet option on mobile devices 2026-02-22 21:40:17 +03:00
pezkuwichain 981d93cc64 feat: wallet modal with two connection options and Kurdistan flag for language switcher 2026-02-22 21:29:29 +03:00
pezkuwichain 930c2fc910 feat: two-card wallet connection UI (extension + mobile) and update Chrome Web Store link 2026-02-22 20:47:41 +03:00
pezkuwichain 71ac20af00 feat: add WalletConnect i18n keys to all locale files 2026-02-22 20:04:18 +03:00
pezkuwichain 1ee4bc4f1d fix: add browser to mainFields resolution to prevent crypto-browserify bundling
ws package has a browser field pointing to a crypto-free entry point.
Without 'browser' in mainFields, Vite resolved the Node.js version
which pulled in crypto-browserify -> inherits -> runtime error.
2026-02-22 19:48:03 +03:00
pezkuwichain e2cfa136f9 fix: alias crypto-browserify to native Web Crypto shim (inherits error) 2026-02-22 19:37:19 +03:00
pezkuwichain ddcf3eca23 fix: remove unused imports and add missing dependency 2026-02-22 19:28:20 +03:00
pezkuwichain 88b69f13cd feat: add WalletConnect v2 integration for mobile wallet connection
- Add @walletconnect/sign-client for dApp-side WC v2 support
- Create walletconnect-service.ts with session management and Signer adapter
- Create WalletConnectModal.tsx with QR code display
- Update PezkuwiContext with connectWalletConnect(), session restore, walletSource tracking
- Update WalletContext signing router: mobile → WalletConnect → extension
- Update WalletModal with "Connect with pezWallet (Mobile)" button
- Move WalletConnect projectId to env variable
- Fix vite build: disable assetsInclude for JSON (crypto-browserify compat)
2026-02-22 18:36:29 +03:00
pezkuwichain da7098bc42 fix: add 200 missing translation keys to all locale files
Add chainSpecs, delegation, governance, hero, identity, login,
nav, notifications, profile, proposals, team, websocket keys
to tr, kmr, ckb, ar, fa locale files.
2026-02-22 16:10:56 +03:00
pezkuwichain 8f187cd971 fix: query nominators from Asset Hub, treasury balances from both chains
NetworkStats now queries staking.nominators from Asset Hub instead of
Relay Chain (staking migrated to AH). Treasury hook fetches HEZ from RC
and PEZ from AH (asset 1) for accurate balance display.
2026-02-22 06:36:15 +03:00
pezkuwichain d19be068f9 fix: add missing tokenomics, teamSection and treasury keys to en.ts 2026-02-22 05:39:44 +03:00
pezkuwichain 4f683538d3 feat: complete i18n support for all components (6 languages)
Add full internationalization across 127+ components and pages.
790+ translation keys in en, tr, kmr, ckb, ar, fa locales.
Remove duplicate keys and delete unused .json locale files.
2026-02-22 04:48:20 +03:00
pezkuwichain 5b26cc8907 feat: clone shared i18n translations to web locale files
Add ~200 new translation keys per language from shared library.
Create separate ckb.ts for Sorani Kurdish (was using Kurmanji).
2026-02-21 17:34:38 +03:00
pezkuwichain 829fdc83d2 feat: add language switcher to mobile nav bar 2026-02-21 16:53:48 +03:00
pezkuwichain c844932519 fix: calculate total staked from ledger entries instead of erasTotalStake 2026-02-21 16:35:39 +03:00
pezkuwichain 43ffc65ee6 fix: replace trust score card with citizen count (Hejmara Kurd) 2026-02-21 16:33:16 +03:00
pezkuwichain a5a9bcca91 feat: nav 4x2 button grid + hero stats from correct chains
- Replace nav menu with 4x2 mobile-app-style button grid (responsive)
- Fetch staking stats from Asset Hub instead of Relay Chain
- Governance stats (proposals, voters) remain on Relay Chain
- Trust score: show login prompt for guests, real score for users
- Full-width root container, centered hero, node globals shim fix
2026-02-21 16:29:53 +03:00
pezkuwichain e4abee939f feat: migrate staking from Relay Chain to Asset Hub
- shared/staking.ts: update for AH (remove babe dep, remove validatorPool, bonding 2 eras)
- StakingDashboard: switch all staking operations from api (RC) to assetHubApi (AH)
2026-02-21 02:55:27 +03:00
pezkuwichain ecda5374e4 fix: resolve eslint no-explicit-any in PEZ treasury query 2026-02-18 06:01:42 +03:00
pezkuwichain dd2301f175 fix: correct trust score divisor to 10000 and show both relay+PEZ treasury balances 2026-02-18 05:45:33 +03:00
pezkuwichain ead3ea11a5 fix: replace mock governance data with live chain queries and fix trust score formulas 2026-02-18 05:04:01 +03:00
pezkuwichain 6cabedb269 fix: reduce hero stat card font size to prevent text overflow 2026-02-17 16:50:32 +03:00
pezkuwichain 210fb09469 fix: hero stats - format staked tokens, real trust score, active-only proposals 2026-02-17 03:11:21 +03:00
pezkuwichain b7d7d008dc feat: staking score 3-state model and noter integration 2026-02-17 01:32:54 +03:00
pezkuwichain ce35392d67 fix: update admin wallet whitelist with correct addresses 2026-02-17 00:25:51 +03:00
pezkuwichain 48250a36f5 fix: rename Trust Score to Referral Score, merge invitations list 2026-02-16 04:31:31 +03:00
pezkuwichain 12a27c3f87 fix: remove unused FOUNDER_ADDRESS import 2026-02-16 04:07:59 +03:00
pezkuwichain 6a33b9ccb1 fix: hide hero background image on mobile, improve responsive sizing 2026-02-16 03:19:53 +03:00
pezkuwichain 86dc8c1fcd fix: rewrite citizenship workflow to referral-based model
- Replace governance-based KYC with trustless referral workflow
- New 3-step flow: applyForCitizenship -> approveReferral -> confirmCitizenship
- Fix FOUNDER_ADDRESS (was Alice test address)
- Use applications storage instead of legacy pendingKycApplications
- Add approveReferral, cancelApplication, confirmCitizenship functions
- Rewrite KycApprovalTab as referrer approval panel (no governance)
- Fix InviteUserModal to use peopleApi for referral pallet
- Add pending approvals section to ReferralDashboard
2026-02-16 02:56:27 +03:00
pezkuwichain 59442e58ae fix: broken image paths and staking signer reconnect 2026-02-16 01:30:21 +03:00
pezkuwichain f3450d1207 feat: align frontend scoring with People Chain pallet queries
- Update staking score/tracking calls from relayApi to peopleApi
- Fix referral score to use on-chain tiered scoring with penalties
- Fix perwerde score to query studentCourses + enrollments storage
- Update Dashboard and StakingDashboard for People Chain API
2026-02-13 20:13:55 +03:00
pezkuwichain 9963a759d3 fix: fix Zagros endpoints, hide PEZ Rewards when pallet unavailable
- Remove Asset Hub and People Chain endpoints from Zagros/Development config (relay chain only)
- Default network now always mainnet
- PEZ Rewards card only renders when pallet is available on chain
- Dynamic grid layout when PEZ Rewards card is hidden
2026-02-13 18:11:24 +03:00
pezkuwichain 6fe061cef2 feat(pez-rewards): align frontend with blockchain pallet storage queries
- Fix storage query names: getCurrentEpochInfo, epochStatus, getUserTrustScoreForEpoch, getClaimedReward, getEpochRewardPool
- Add recordTrustScore() and claimPezReward() extrinsic functions
- Add EpochStatus type and epoch status display (Open/ClaimPeriod/Closed)
- Move PezRewardInfo and getPezRewards from staking.ts to scores.ts
- Add PEZ Rewards error/success messages to error-handler.ts
- Add PEZ Rewards card with Record/Claim to Dashboard, Wallet, and Staking pages
- Add recordTrustScore to TransactionHistory tracking
2026-02-13 17:37:10 +03:00
pezkuwichain b378aeb171 refactor(scores): remove frontend fallback, read all scores from blockchain
Remove all frontend staking/trust score calculation and localStorage
fallback code. All scores now read directly from People Chain pallets
(pezpallet-trust, pezpallet-referral, pezpallet-tiki). Trust pallet
computes composite score on-chain.
2026-02-13 03:14:57 +03:00
pezkuwichain 910114d9f0 fix(build): restore polyfill shims for shared folder imports 2026-02-11 03:14:45 +03:00
pezkuwichain 12874822fc fix(mobile): comprehensive mobile UI redesign for better UX
- Header: icon-only wallet button on mobile, fix hamburger overflow
- Dashboard: responsive tabs with flex-wrap and smaller text
- Citizens: responsive ID card layout, stack NFT badges on mobile
- BeCitizen: stack header buttons vertically on mobile
- GovernanceInterface: add scrollable tabs
- DEXDashboard: responsive admin buttons grid (2 cols on mobile)
- P2PDashboard: responsive header and scrollable tabs
- Dialog: mobile-first sizing with proper padding and max-height
- Tabs UI: base responsive classes for all tab components
- Add xs:480px breakpoint and scrollbar-hide utility
- Fix vite polyfills config to prevent initialization errors
2026-02-11 02:14:32 +03:00
pezkuwichain b173810c27 refactor: remove WalletConnect, add mobile menu with wallet button
- Remove WalletConnectModal component (WalletConnect not ready)
- Restore PezkuwiWalletButton for extension-only connection
- Hide logo on mobile to save header space
- Add hamburger menu for mobile navigation
2026-02-11 01:14:38 +03:00
pezkuwichain 11241e8252 feat: add wallet connection options and mobile navigation
- New WalletConnectModal with Extension/WalletConnect options
- Mobile detection: shows only Pezkuwi Wallet on mobile
- Deep link support for pezkuwiwallet:// scheme
- Hamburger menu for mobile navigation
- Full mobile menu with all navigation items
2026-02-11 00:41:45 +03:00
pezkuwichain 6f6cedf239 fix(security): block government portal access without verification
- Move verification modal to separate return block when !accessGranted
- Prevent bypassing verification by clicking rapidly
- Redirect to /citizens if modal is closed without verification
- Fix Turkish text to Kurdish: Doğrula -> Bipejirîne
2026-02-10 23:11:41 +03:00
pezkuwichain cd69be7487 fix: remove double verification and add debug logging
- Remove verification dialog from Citizens.tsx (GovernmentEntrance handles it)
- Add console debug logging to see roleNFTs and authorization check
2026-02-10 22:29:00 +03:00
pezkuwichain 415be478b8 feat(Citizens): use localStorage for citizen profile instead of Supabase
- Personal info (name, father name, location, photo) stored locally
- Added edit modal for updating profile info
- Auto-open edit modal on first visit for new device
- Profile data tied to wallet address
- Removed Supabase dependency for privacy
2026-02-10 21:50:58 +03:00
pezkuwichain 2fa7623d17 fix: correct tiki role field name and update card header text
- GovernmentEntrance: changed tiki.tiki_type to tiki.tikiRole
- Citizens: changed KOMARGEHA to KOMARI KURDISTAN
2026-02-10 21:37:58 +03:00