Commit Graph

422 Commits

Author SHA1 Message Date
pezkuwichain df22c9ba10 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 bfb56dacab feat: add language switcher to mobile nav bar 2026-02-21 16:53:48 +03:00
pezkuwichain c36625e578 fix: calculate total staked from ledger entries instead of erasTotalStake 2026-02-21 16:35:39 +03:00
pezkuwichain c48b16a256 fix: replace trust score card with citizen count (Hejmara Kurd) 2026-02-21 16:33:16 +03:00
pezkuwichain 1837fb1f00 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 d9d5112383 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 9fd6b79249 fix: citizenship pending approvals not showing for founder
Application struct has no status field - was filtering by
appData.status === 'PendingReferral' which always returned false.
Now checks kycStatuses storage instead, and allows founder to see
all pending applications.
2026-02-20 00:44:05 +03:00
pezkuwichain a31770aabe fix: resolve eslint no-explicit-any in PEZ treasury query 2026-02-18 06:01:42 +03:00
pezkuwichain 65bc266841 fix: correct trust score divisor to 10000 and show both relay+PEZ treasury balances 2026-02-18 05:45:33 +03:00
pezkuwichain da8abecaca fix: replace mock governance data with live chain queries and fix trust score formulas 2026-02-18 05:04:01 +03:00
pezkuwichain 676d0415c0 fix: reduce hero stat card font size to prevent text overflow 2026-02-17 16:50:32 +03:00
pezkuwichain 6d70a2793a fix: hero stats - format staked tokens, real trust score, active-only proposals 2026-02-17 03:11:21 +03:00
pezkuwichain 194816c9e9 fix: compute staking score from CachedStakingDetails instead of hardcoded 0 2026-02-17 02:38:46 +03:00
pezkuwichain 226e997723 feat: staking score 3-state model and noter integration 2026-02-17 01:32:54 +03:00
pezkuwichain 56fe67f747 fix: update admin wallet whitelist with correct addresses 2026-02-17 00:25:51 +03:00
pezkuwichain 631eaa5a4c fix: rename Trust Score to Referral Score, merge invitations list 2026-02-16 04:31:31 +03:00
pezkuwichain 3168144ff8 fix: remove unused FOUNDER_ADDRESS import 2026-02-16 04:07:59 +03:00
pezkuwichain 6c9fb35d5a fix: hide hero background image on mobile, improve responsive sizing 2026-02-16 03:19:53 +03:00
pezkuwichain e9d5fef39a 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 e9f01685d0 fix: broken image paths and staking signer reconnect 2026-02-16 01:30:21 +03:00
pezkuwichain e0bc4df02f Add telegram welcome image 2026-02-14 08:35:30 +03:00
pezkuwichain 003bff05b3 fix(scores): use correct PezRewards storage query names from live chain metadata
Storage names were wrong (from integration test dev node, not live chain):
- getCurrentEpochInfo → epochInfo
- getUserTrustScoreForEpoch → userEpochScores
- getClaimedReward → claimedRewards
- getEpochRewardPool → epochRewardPools
2026-02-13 20:44:40 +03:00
pezkuwichain 6a7fb4d857 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 37e47b7a73 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 167a7aff4e 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 fbd53b9960 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 fa5c89128d fix(build): restore polyfill shims for shared folder imports 2026-02-11 03:14:45 +03:00
pezkuwichain 6010ace1b0 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 3fc4d685ae 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 e6720a489b 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 f0ac384943 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 a0ea8ac9b4 fix(tiki): fetch roleNFTs from blockchain instead of returning empty array
- getAllTikiNFTDetails now calls fetchUserTikiNFTs to query UserTikis storage
- This enables proper authorization check for government roles like Serok
2026-02-10 22:56:22 +03:00
pezkuwichain 788d10a41e 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 077004161c 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 626b47f63c 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
pezkuwichain a0fafb2f75 feat(Citizens): replace PNG citizen card with professional HTML/CSS design
- New digital citizen ID card with Kurdish flag colors gradient
- Added security pattern overlay for authenticity
- Header with sun symbol, Republic of Kurdistan branding
- Clean layout: photo, personal info, NFT/citizen number badges
- Verified badge and corner decorations
- Footer with blockchain info
2026-02-10 21:23:27 +03:00
pezkuwichain f8710efade fix(GovernmentEntrance): use correct citizen ID format for verification 2026-02-10 21:20:58 +03:00
pezkuwichain 3fcfb81360 Fix CitizensIssues: add missing filter state variables and fix dependency array 2026-02-10 19:18:44 +03:00
pezkuwichain 1e250fee22 Add debug logging to handleCitizensIssue 2026-02-10 18:41:53 +03:00
pezkuwichain cb00407a26 fix: remove unused variables (lint errors) 2026-02-10 18:14:33 +03:00
pezkuwichain e53be65975 fix: use People Chain API for tiki and identityKyc pallets
- DashboardContext: query tiki/kyc from peopleApi instead of relay api
- KycApprovalTab: use peopleApi for identityKyc.pendingKycApplications
- NewCitizenApplication: all KYC operations now use People Chain

These pallets are on People Chain, not Relay Chain. This fixes the
"mafe te tuneye" error when accessing Citizens portal.
2026-02-10 18:09:26 +03:00
pezkuwichain 76e024276c fix: use getAllScoresWithFallback in Dashboard.tsx
Both AccountBalance.tsx and Dashboard.tsx now use the same
frontend fallback for trust score calculation until runtime upgrade.
2026-02-07 01:48:06 +03:00
pezkuwichain ba046636b8 debug: add console logs for trust score calculation 2026-02-07 01:39:11 +03:00
pezkuwichain 6b1e07dadf fix: use frontend fallback for trust score calculation
On-chain trust pallet exists but StakingInfoProvider returns None,
causing trust score to be 0 even when user has stake. Use frontend
calculation until runtime upgrade is deployed.
2026-02-07 01:25:05 +03:00
pezkuwichain 91070435d5 feat: add frontend fallback for staking and trust scores
Until runtime upgrade is deployed, calculate scores on frontend:

shared/lib/scores.ts:
- getFrontendStakingScore: Read stake from Relay Chain, track in localStorage
- getFrontendTrustScore: Calculate using pallet formula
- getAllScoresWithFallback: Combined score fetching with fallback

Formula (matching pezpallet-trust):
- weighted_sum = staking*100 + referral*300 + perwerde*300 + tiki*300
- trust_score = (staking * weighted_sum) / 100

Components updated:
- AccountBalance.tsx: Use getAllScoresWithFallback
- HeroSection.tsx: Use getTrustScoreWithFallback
2026-02-07 00:44:04 +03:00
pezkuwichain e8808e1a06 fix: formatBalance now correctly parses hex values from blockchain 2026-02-06 22:14:56 +03:00
pezkuwichain daff782096 fix: support both sonner and shadcn toast APIs in error handler 2026-02-06 21:42:27 +03:00
pezkuwichain 789920ed80 fix: query pezRewards and stakingScore from People Chain
- pezRewards pallet is on People Chain, not Relay Chain
- stakingScore pallet is also on People Chain
- Update getStakingInfo to accept optional peopleApi parameter
- Update StakingDashboard to pass peopleApi
2026-02-06 21:28:56 +03:00
pezkuwichain 47415fd75d fix: update score system to use correct People Chain APIs
- Remove LP staking score (not available in blockchain)
- All scores now fetched from People Chain
- Add Start Score Tracking button to Dashboard
- Add staking status display showing tracking duration
2026-02-06 20:48:27 +03:00
pezkuwichain 9865e32658 feat: add LP staking score and DOT/ETH/BTC tokens 2026-02-06 20:01:12 +03:00