Commit Graph
100 Commits
Author SHA1 Message Date
Kurdistan Tech Ministry e3beba7538 fix: correct KycLevel enum map and restrict founder bypass
1. Fixed enum map missing NotStarted at index 0, causing all status
   indices to be off by one (ReferrerApproved decoded as PendingReferral)
2. Restricted founder bypass to only show applications with no referrer,
   not all applications regardless of referrer
2026-03-01 22:08:40 +03:00
Kurdistan Tech Ministry 419e75f38e fix: update referral share text with localized invitation message
Share text now includes friendly invitation + wallet address for
manual paste. Hardcoded English text replaced with i18n keys.
2026-02-28 02:35:25 +03:00
Kurdistan Tech Ministry a8505a4d50 fix: use dynamic SS58 prefix in referral/KYC address encoding
Replace hardcoded SS58 prefix 42 with api.registry.chainSS58 ?? 42
for robustness in getPendingApprovalsForReferrer, getReferralInfo,
and getMyReferrals functions.
2026-02-28 01:59:04 +03:00
Kurdistan Tech Ministry fd57a75fd9 fix: handle all kycStatus formats in pending approvals check
toJSON() for Substrate enums can return string, object ({"approved":null}),
or number (enum index). Previous code assumed string only, causing already
approved applications to appear as pending.
2026-02-27 04:14:35 +03:00
Kurdistan Tech Ministry abdb67f6ca fix: convert hex AccountId to SS58 in referral/KYC queries
toJSON() returns hex format for AccountId fields but comparison was
against SS58 addresses, causing referrer matching to always fail.
- citizenship-workflow: encodeAddress for referrer in getPendingApprovals
- citizenship-workflow: handle both PascalCase and camelCase KycStatus
- referral: encodeAddress for referrer in getMyReferrals and getReferralInfo
2026-02-27 03:57:36 +03:00
Kurdistan Tech Ministry c64c4bf00f fix: wait 12s before auto-verify to allow block inclusion
TX was not yet included in a block when verify fired immediately
after signing, causing first attempt to always fail. Block time on
Asset Hub is ~12s, so delay the verify call accordingly.
2026-02-26 15:55:49 +03:00
Kurdistan Tech Ministry aa7cc78de8 fix: auto-verify deposit after TX sign, remove manual verify step
The manual "Verify Deposit" step required users to click a button after
signing. Hash was already captured automatically, making the manual step
redundant and risky (modal close = hash lost). Now verification starts
immediately after TX is signed, with spinner UI and retry on failure.
2026-02-26 15:30:30 +03:00
Kurdistan Tech Ministry 3e310fb980 fix: improve CitizensIssues mobile UI — two-line tab labels, responsive header 2026-02-25 05:58:58 +03:00
Kurdistan Tech Ministry 60bdf84816 fix: improve mobile UI across all pages for 360px screens
- AppLayout: tighter button grid, smaller icons/fonts, centered dropdowns, narrower mobile menu
- HeroSection: smaller stats padding/gap, compact CTA buttons
- GovernmentEntrance: responsive title/tabs/vote layout, smaller action buttons
- Citizens: smaller portal title and announcement header
- GovernanceInterface: 2-col tab grid on mobile
2026-02-25 04:39:05 +03:00
Kurdistan Tech Ministry 05280cbd45 fix: move Start Citizenship button to top bar and Ready to Join card above benefits grid 2026-02-24 23:56:07 +03:00
Kurdistan Tech Ministry cccf5dec21 fix: improve DEX page mobile UI — smaller back button, taller chart, compact swap card
- Back to Home button: smaller padding/font on mobile, pinned to corner
- PriceChart: increase height to 280px, stack header vertically on mobile
- TokenSwap: reduce padding/gaps/fonts on mobile, fix double-colon in balance text
2026-02-24 23:48:17 +03:00
Kurdistan Tech Ministry 8232cdb0e1 fix: extract actual error from process-withdraw edge function response
Supabase JS client wraps non-2xx responses as generic FunctionsHttpError
("Edge Function returned a non-2xx status code"), hiding the real error.
Now reads the response body to show the actual error message.

Also adds migration to drop auth.users FK on p2p_withdrawal_limits
(already absent in production, added for migration completeness).
2026-02-24 23:01:50 +03:00
Kurdistan Tech Ministry 53854abba9 fix: remove unused getApprovedChainId and stale eslint-disable 2026-02-24 22:24:44 +03:00
Kurdistan Tech Ministry 6c1865cf55 fix: require all chains in WC session and use correct chainId
Three fixes for WC signing:

1. Changed optionalNamespaces to requiredNamespaces so wallet MUST
   approve all Pezkuwi chains (relay, asset hub, people) or reject.

2. Restored payload-based chainId in signPayload — wallet validates
   that WC chainId matches the transaction payload's genesisHash
   and rejects mismatches with "Wrong chain id passed by dApp".

3. Added session validation on restore — old sessions missing
   required chains are discarded, forcing a fresh session with
   all chains included.
2026-02-24 22:20:37 +03:00
Kurdistan Tech Ministry e6c8f2a537 fix: add missing useEffect dependencies in P2P components 2026-02-24 22:16:32 +03:00
Kurdistan Tech Ministry 5dc4298974 fix: send plain SS58 address in WC signPayload instead of CAIP-10 2026-02-24 22:10:46 +03:00
Kurdistan Tech Ministry c79966c192 fix: expose actual WC error message instead of generic fallback 2026-02-24 22:01:49 +03:00
Kurdistan Tech Ministry 1bedda8006 fix: use session-approved chainId for WC signing requests
WC SignClient validates that the request chainId is in the session's
approved namespaces. When the DApp browser creates a session, it may
only approve the relay chain. Signing requests for Asset Hub or People
Chain then fail with "Missing or invalid chainId".

Fix: always use a chainId from the session's approved chains for the
WC request. The wallet determines the actual signing chain from the
transaction payload's genesisHash, not from the WC request chainId.
2026-02-24 20:36:56 +03:00
Kurdistan Tech Ministry 8b906f0b84 fix: hardcode chain genesis hashes in WC session to fix signing
WC session was missing Asset Hub and People Chain because their APIs
weren't connected yet at session creation time. Also fix catch blocks
in ExistingCitizenAuth that referenced undefined err variable.
2026-02-24 20:00:20 +03:00
Kurdistan Tech Ministry aac6c6581c fix: rewrite ID card to flow layout for mobile readability 2026-02-24 10:42:14 +03:00
Kurdistan Tech Ministry 87b081fa60 update: upgrade @pezkuwi/api to 16.5.36, clean up images and assets
- Upgrade @pezkuwi/api 16.5.11 -> 16.5.36 in supabase edge functions
- Remove manual SS58-to-hex workaround, use native SS58 addresses
- Add kurdistan flag and Dijital Kurdistan images
- Add PezkuwiExplorer to web public assets
- Remove unused react-logo and telegram_welcome images
- Add *.bak to gitignore
2026-02-24 10:28:47 +03:00
Kurdistan Tech Ministry 570e426333 fix: citizen portal mobile responsive layout
- Shrink title/banner fonts and padding on mobile
- Move digital ID card above entrance buttons
- Auto-resize uploaded photos via canvas instead of 2MB limit
- Make entrance cards compact 2-column grid on all screens
2026-02-24 10:26:25 +03:00
Kurdistan Tech Ministry 6c4960c32a fix: send plain SS58 address in WC signRaw instead of CAIP-10
The signRaw handler was wrapping the address in CAIP-10 format
(polkadot:<chain>:<address>) before sending to the wallet. The wallet
expects a plain SS58 address in polkadot_signMessage params, causing
InvalidChecksumException crash when trying to decode the CAIP-10 string.
2026-02-24 09:45:01 +03:00
Kurdistan Tech Ministry b8a0d5a5f3 fix: add storage RLS policies for p2p-payment-proofs bucket
Allow open INSERT/SELECT/DELETE on p2p-payment-proofs bucket since
users authenticate via wallet identity, not Supabase Auth.
2026-02-24 06:28:16 +03:00
Kurdistan Tech Ministry 607ef72948 fix: payment proof lifecycle, repeating toast, and escrow migrations
- Replace IPFS/Pinata upload with Supabase Storage for payment proofs
- Add 1-day auto-expiry for proof images (retained if disputed)
- Fix repeating "payment deadline expired" toast (fire once, clear interval)
- Fix cancel_reason → cancellation_reason column reference
- Add payment proof lifecycle migration (proof_expires_at, cleanup functions)
- Add atomic escrow migration (accept_p2p_offer, complete/cancel trade)
- Add cleanup-proofs edge function for daily expired proof deletion
2026-02-24 06:15:22 +03:00
Kurdistan Tech Ministry d380e6a3cd fix: correct cancel_reason column name to cancellation_reason
Also add migration to drop remaining auth.users FK constraints
on p2p_messages, notifications, ratings, audit_log tables.
2026-02-24 05:34:42 +03:00
Kurdistan Tech Ministry 0a9349f2b3 fix: show actual Supabase error details in P2P toast messages
PostgrestError is not instanceof Error, so catch blocks were falling
through to generic messages. Now extracts .message and .details from
Supabase errors for better debugging.
2026-02-24 05:00:45 +03:00
Kurdistan Tech Ministry 231506a9f1 fix: add Sonner toast renderer for P2P trade notifications
P2P modules (TradeModal, p2p-fiat) use Sonner toast but the Sonner
Toaster component was not mounted in App.tsx. Only the shadcn Toaster
was rendered, causing all P2P toast.error/success calls to be invisible.
2026-02-24 04:46:35 +03:00
Kurdistan Tech Ministry 0ccac1253b fix: update withdrawal time from 5-30 to 1-3 min in Farsi and Sorani 2026-02-24 04:11:21 +03:00
Kurdistan Tech Ministry d73c84e042 fix: update P2P withdrawal processing time from 5-30 to 1-3 minutes 2026-02-24 04:07:07 +03:00
Kurdistan Tech Ministry 9f35eaadf6 feat: compact OKX-style mobile P2P ad cards 2026-02-24 03:47:03 +03:00
Kurdistan Tech Ministry 57bbec5cdd feat: add P2P messages inbox and OKX-style navigation
- Add P2PMessages inbox page listing all trade conversations
- Update P2PDashboard top nav with icon+label buttons (Orders, Ads, Messages)
- Add unread message count badge with realtime subscription
- Add /p2p/messages route
- Add i18n translations for all 6 locales
2026-02-24 03:24:28 +03:00
Kurdistan Tech Ministry 42bb4140f2 fix: WalletConnect multi-chain signing for Asset Hub deposits 2026-02-24 03:14:00 +03:00
Kurdistan Tech Ministry b1de3cc017 fix: use PLATFORM_WALLET_MNEMONIC env var in process-withdrawal 2026-02-24 00:58:12 +03:00
Kurdistan Tech Ministry 889e0f5886 fix: unify platform wallet for deposit and withdrawal
Changed PLATFORM_WALLET to deposit wallet address (5H18ZZBU...)
so both deposit and withdrawal use the same custody wallet.
2026-02-24 00:50:49 +03:00
Kurdistan Tech Ministry bb70bc4596 fix: Asset Hub AccountId32 encoding for withdrawal edge functions
Deno npm shim breaks SS58 decoding in @pezkuwi/api type registry,
causing PezspCoreCryptoAccountId32 to receive 48-byte SS58 strings
instead of 32-byte public keys. Added inline ss58ToHex decoder and
explicit hex-based nonce fetching to avoid all SS58 → AccountId32
conversions at the API level. Also adds P2P E2E test script (45/45).
2026-02-24 00:16:11 +03:00
Kurdistan Tech Ministry 56adb45b07 fix: remove price_per_unit from offer insert (generated column) 2026-02-23 22:36:15 +03:00
Kurdistan Tech Ministry 2150ab4997 fix: withdrawal end-to-end flow and UI improvements
- requestWithdraw() calls process-withdraw edge function for full flow
  (lock balance + blockchain TX + complete) instead of just DB lock
- Remove pending request block from withdrawal validation — backend
  already enforces available_balance with FOR UPDATE row lock
- Pending requests shown as info alert instead of blocking error
- Balance card: numbers right-aligned, 2 decimal places
2026-02-23 22:32:58 +03:00
Kurdistan Tech Ministry b839a1834d fix: withdrawal calls process-withdraw edge function, balance card UI improvements
- requestWithdraw() now calls process-withdraw edge function instead of
  just locking balance in DB. This triggers the full flow: lock balance,
  send blockchain TX, complete withdrawal.
- Balance card: numbers right-aligned, 2 decimal places instead of 4
- Added public SELECT RLS policy on payment_methods table (was blocking
  anon users from loading payment method dropdown)
2026-02-23 22:19:06 +03:00
Kurdistan Tech Ministry 646e388b28 fix: wait for block finalization in verify-deposit instead of failing
Replace hard fail on unfinalized blocks with a retry loop that polls
every 6 seconds up to 60 seconds. The TX is already fully verified via
events at this point — we just wait for GRANDPA finality before crediting.
2026-02-23 22:09:46 +03:00
Kurdistan Tech Ministry a50a5dbffb fix: route P2P deposits and verification to Asset Hub instead of relay chain
DepositModal was building transactions via relay chain API, and all three
edge functions (verify-deposit, process-withdraw, process-withdrawal) had
RPC endpoints hardcoded or defaulting to the relay chain. This caused
deposit verification to fail with "Transaction not yet finalized" and
created a chain mismatch with the withdrawal system which operates on
Asset Hub.

- DepositModal: use assetHubApi instead of api for transfer TX
- verify-deposit: RPC_HTTP/RPC_WS default to asset-hub-rpc (env override)
- process-withdraw: RPC_ENDPOINT default to asset-hub-rpc (env override)
- process-withdrawal: RPC_ENDPOINT default to asset-hub-rpc
2026-02-23 21:50:57 +03:00
Kurdistan Tech Ministry 1f9111bdd4 fix: update edge functions for wallet-based auth
- process-withdraw: replace auth.getUser() with userId from request body
- process-withdrawal: fix esm.sh imports to npm: style (@pezkuwi/api@16.5.11)
2026-02-23 20:09:36 +03:00
Kurdistan Tech Ministry 6cfc64475c fix: replace auth.uid() RLS policies with open access for wallet-based auth
All P2P table RLS policies used auth.uid() which returns NULL since users
authenticate via wallet, not Supabase Auth. Replace with open access policies.

Financial security maintained through SECURITY DEFINER RPC functions
(escrow lock/release/refund, process_deposit, request_withdraw).
2026-02-23 20:04:20 +03:00
Kurdistan Tech Ministry a80a2cfb07 feat: replace supabase auth with citizen/visa identity system for P2P
Replace all supabase.auth.getUser() calls with P2PIdentityContext that
resolves identity from on-chain citizen NFT or off-chain visa system.

- Add identityToUUID() in shared/lib/identity.ts (UUID v5 from citizen/visa number)
- Add P2PIdentityContext with citizen NFT detection and visa fallback
- Add p2p_visa migration for off-chain visa issuance
- Refactor p2p-fiat.ts: all functions now accept userId parameter
- Fix all P2P components to use useP2PIdentity() instead of useAuth()
- Update verify-deposit edge function: walletToUUID -> identityToUUID
- Add P2PLayout with identity gate (wallet/citizen/visa checks)
- Wrap all P2P routes with P2PLayout in App.tsx
2026-02-23 19:54:57 +03:00
Kurdistan Tech Ministry aa3a49f0f6 fix: resolve critical fast-xml-parser vulnerability and block deploy on audit
- Override fast-xml-parser to ^5.3.6 (fixes CVE-2026-25896, CVE-2026-26278, CVE-2026-25128)
- Add security-audit to deploy job dependencies in quality-gate workflow
2026-02-23 18:23:55 +03:00
Kurdistan Tech Ministry b7c4937122 fix: use direct fetch for verify-deposit to read error responses 2026-02-23 12:29:28 +03:00
Kurdistan Tech Ministry 9518dcd501 fix: suppress eslint any warnings in verify-deposit edge function 2026-02-23 12:18:56 +03:00
Kurdistan Tech Ministry cbf98e4dc9 fix: verify-deposit blockchain verification and wallet-based auth
- Drop auth.users FK constraints for wallet-based authentication
- Fix deferrable unique constraint on blockchain_tx_hash (ON CONFLICT compat)
- Rewrite block search: HTTP RPC + blake2b instead of WS-only @pezkuwi/api
- Add blockNumber hint for faster verification of older transactions
- Normalize SS58/hex addresses via base58 for reliable comparison
- DepositModal captures approximate block number after tx submission
2026-02-23 12:16:15 +03:00
Kurdistan Tech Ministry 7183e659c6 fix: enforce security audit - remove continue-on-error 2026-02-23 10:19:49 +03:00
Kurdistan Tech Ministry bc03bd87a1 fix: remove web3Enable cache to prevent stale extension state 2026-02-23 09:57:14 +03:00
Kurdistan Tech Ministry 52daa7642d fix: replace Supabase Auth with on-chain sender verification in verify-deposit
Removed JWT auth requirement from edge function. Now uses wallet address
from request body and verifies it matches the on-chain transaction sender.
This works with wallet-based auth instead of Supabase Auth.
2026-02-23 08:49:18 +03:00
Kurdistan Tech Ministry ef44b06a47 fix: suppress eslint any warning in get-signer 2026-02-23 08:31:07 +03:00
Kurdistan Tech Ministry b034954fd1 fix: cache web3Enable to prevent authorization flooding
Consolidated all web3Enable/web3FromAddress calls through getSigner helper.
Cached web3Enable promise so it only runs once per session.
2026-02-23 08:24:41 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 7107f18ea6 debug: add WalletConnect debug logging to diagnose timeout 2026-02-23 00:57:38 +03:00
Kurdistan Tech Ministry f9af28b56b fix: resolve remaining mobile app lint warnings 2026-02-23 00:33:11 +03:00
Kurdistan Tech Ministry 9897d6268e fix: resolve remaining lint warnings (console.log and missing deps) 2026-02-23 00:28:32 +03:00
Kurdistan Tech Ministry cbbea8a5dc fix: resolve all lint warnings in mobile and web apps 2026-02-23 00:24:17 +03:00
Kurdistan Tech Ministry d7278956fa fix: WalletConnect race conditions, session validation and timeout handling 2026-02-23 00:16:34 +03:00
Kurdistan Tech Ministry 87f6d0471e fix: only init WalletConnect when a saved session exists 2026-02-22 22:31:52 +03:00
Kurdistan Tech Ministry e593f5e4bb fix: use deep link instead of QR on mobile, show extension only on desktop 2026-02-22 22:16:55 +03:00
Kurdistan Tech Ministry d6e59b316b fix: show only mobile wallet option on mobile devices 2026-02-22 21:40:17 +03:00
Kurdistan Tech Ministry 981d93cc64 feat: wallet modal with two connection options and Kurdistan flag for language switcher 2026-02-22 21:29:29 +03:00
Kurdistan Tech Ministry 930c2fc910 feat: two-card wallet connection UI (extension + mobile) and update Chrome Web Store link 2026-02-22 20:47:41 +03:00
Kurdistan Tech Ministry 71ac20af00 feat: add WalletConnect i18n keys to all locale files 2026-02-22 20:04:18 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry e2cfa136f9 fix: alias crypto-browserify to native Web Crypto shim (inherits error) 2026-02-22 19:37:19 +03:00
Kurdistan Tech Ministry ddcf3eca23 fix: remove unused imports and add missing dependency 2026-02-22 19:28:20 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry d19be068f9 fix: add missing tokenomics, teamSection and treasury keys to en.ts 2026-02-22 05:39:44 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 829fdc83d2 feat: add language switcher to mobile nav bar 2026-02-21 16:53:48 +03:00
Kurdistan Tech Ministry c844932519 fix: calculate total staked from ledger entries instead of erasTotalStake 2026-02-21 16:35:39 +03:00
Kurdistan Tech Ministry 43ffc65ee6 fix: replace trust score card with citizen count (Hejmara Kurd) 2026-02-21 16:33:16 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 6ac55ecf88 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
Kurdistan Tech Ministry ecda5374e4 fix: resolve eslint no-explicit-any in PEZ treasury query 2026-02-18 06:01:42 +03:00
Kurdistan Tech Ministry dd2301f175 fix: correct trust score divisor to 10000 and show both relay+PEZ treasury balances 2026-02-18 05:45:33 +03:00
Kurdistan Tech Ministry ead3ea11a5 fix: replace mock governance data with live chain queries and fix trust score formulas 2026-02-18 05:04:01 +03:00
Kurdistan Tech Ministry 6cabedb269 fix: reduce hero stat card font size to prevent text overflow 2026-02-17 16:50:32 +03:00
Kurdistan Tech Ministry 210fb09469 fix: hero stats - format staked tokens, real trust score, active-only proposals 2026-02-17 03:11:21 +03:00
Kurdistan Tech Ministry 64caf56612 fix: compute staking score from CachedStakingDetails instead of hardcoded 0 2026-02-17 02:38:46 +03:00
Kurdistan Tech Ministry b7d7d008dc feat: staking score 3-state model and noter integration 2026-02-17 01:32:54 +03:00
Kurdistan Tech Ministry ce35392d67 fix: update admin wallet whitelist with correct addresses 2026-02-17 00:25:51 +03:00
Kurdistan Tech Ministry 48250a36f5 fix: rename Trust Score to Referral Score, merge invitations list 2026-02-16 04:31:31 +03:00
Kurdistan Tech Ministry 12a27c3f87 fix: remove unused FOUNDER_ADDRESS import 2026-02-16 04:07:59 +03:00
Kurdistan Tech Ministry 6a33b9ccb1 fix: hide hero background image on mobile, improve responsive sizing 2026-02-16 03:19:53 +03:00
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 59442e58ae fix: broken image paths and staking signer reconnect 2026-02-16 01:30:21 +03:00
Kurdistan Tech Ministry da2fed7f1e Add telegram welcome image 2026-02-14 08:35:30 +03:00
Kurdistan Tech Ministry 82ba29c1b0 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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
Kurdistan Tech Ministry 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