112 Commits

Author SHA1 Message Date
pezkuwichain 704a46f459 Fix auto-pr to not fail when branches are already in sync 2026-03-02 15:09:11 +03:00
pezkuwichain d14c8f1a3c Replace force-push sync with PR-based auto-merge workflow 2026-03-02 14:22:58 +03:00
pezkuwichain 94c6347521 ci: add post-deploy cleanup step to remove old assets on VPS 2026-03-02 01:37:45 +03:00
pezkuwichain 18cb20a810 chore: sync version to 1.0.230 2026-03-02 01:20:41 +03:00
pezkuwichain a5bdebe755 fix: use raw hex comparison for pending referral matching 2026-03-02 01:14:01 +03:00
pezkuwichain c9211a9e34 fix: compare referrer addresses in SS58 format for pending approvals 2026-03-02 01:04:06 +03:00
pezkuwichain abd4dc7189 feat: in-app citizenship modal + referral approvals + bot DKS link
- Add CitizenshipModal component for in-app citizenship application
  (uses connected wallet keypair, no seed phrase needed)
- Replace /citizens redirect with in-app modal in Rewards section
- Add pending approvals to ReferralContext
- Add approveReferral and getPendingApprovals to citizenship lib
- Add applyingCitizenship/applicationSuccess translations (6 langs)
- Add DKS Kurdistan bot link to telegram-bot welcome message
2026-03-02 00:50:20 +03:00
pezkuwichain faf0faed69 fix: use wallet address in citizenship referral link
Replace ref_telegramId with SS58 wallet address in referral link.
Share message now includes invitation text, auto-fill link, and
wallet address for manual paste in the referrer field.
2026-02-28 02:33:39 +03:00
pezkuwichain 80debdc640 feat: add @DKSKurdistanBot with Claude AI assistant
- Add DKS bot support to telegram-bot and telegram-auth functions
- Claude-powered Q&A using PezkuwiChain whitepaper knowledge base
- Update Telegram social link to dijitalkurdistan channel
2026-02-28 02:03:36 +03:00
pezkuwichain 5065e0f70c fix: wire referral deep link to citizenship form via startParam
- Detect SS58 address in Telegram startParam and auto-route to CitizenPage
- Pass startParam as initialReferrer to CitizenForm
- Show read-only referrer badge when pre-filled from referral link
2026-02-28 02:00:37 +03:00
pezkuwichain b800b36b9f fix: use ClaimedRewards double-map for accurate unclaimed reward detection
- Replace legacy ledger.claimedRewards (empty in paged-rewards Substrate)
  with ClaimedRewards(era, validator) storage double-map
- Track user's page in erasStakersPaged and check against claimed pages
- Use historyDepth instead of hardcoded 10 eras
- Split batch payouts into groups of 5 to avoid block weight overflow
- Use utility.batch instead of batchAll for resilience
- Pass page to payoutStakersByPage when available
2026-02-27 03:07:14 +03:00
pezkuwichain b56760b22e fix: chat message alignment + auto-refresh for all P2P screens
- TradeChat: use authUserId for sender matching (fixes all messages
  appearing on left side instead of bubble alignment)
- BalanceCard: auto-refresh every 30s
- OfferList: auto-refresh every 15s
- MyOffers/MyTrades: auto-refresh every 15s when tab is active
2026-02-27 02:12:47 +03:00
pezkuwichain 4fbf60f940 feat: return auth_user_id from telegram-auth for P2P role matching 2026-02-27 01:51:57 +03:00
pezkuwichain 556b850ec2 fix: use auth.users UUID for trade role matching
telegram-auth now returns auth_user_id alongside public.users data.
TradeView uses authUserId (auth.users UUID) to match buyer_id/seller_id,
fixing missing action buttons (mark paid, confirm, cancel).
2026-02-27 01:51:14 +03:00
pezkuwichain 8c36b832b8 fix: fallback to PLATFORM_WALLET_MNEMONIC for withdraw TX 2026-02-27 01:17:01 +03:00
pezkuwichain 24cd89606e feat: add blockchain TX processing to withdraw function
request-withdraw-telegram now sends tokens from hot wallet to user wallet
using @pezkuwi/api, instead of leaving requests in pending state.
Falls back to pending if PLATFORM_PRIVATE_KEY is not configured.
2026-02-27 01:11:05 +03:00
pezkuwichain 705002f83f fix: prettier formatting in P2P tab highlight 2026-02-27 00:58:16 +03:00
pezkuwichain 910610491f fix: dual bot token auth + P2P UI logic fixes
- All 17 edge functions now check both TELEGRAM_BOT_TOKEN and
  TELEGRAM_BOT_TOKEN_KRD for session verification
- Add perPage:1000 to listUsers calls to prevent pagination issues
- Fix offer button label: Buy tab shows "Al" (green), Sell tab shows "Sat" (red)
- Fix active tab highlight with cyan color for visibility
- Fix modal transparency (add --card CSS variable)
- Fix withdraw tab sync (useEffect on modal open)
2026-02-27 00:53:52 +03:00
pezkuwichain b67809481e fix: pass block number hint to verify-deposit for faster verification
- Get block number from finalized block hash in frontend
- Pass as hint to verify-deposit-telegram to avoid 100-block scan
- Improve error message extraction in callEdgeFunction
2026-02-26 22:44:50 +03:00
pezkuwichain 4686453df7 feat: automate deposit flow + fix listUsers pagination
- Rewrite DepositWithdrawModal to send TX automatically via assetHubApi
  instead of manual copy-paste-hash flow
- Fix listUsers pagination bug (default 50) in 4 edge functions by
  adding perPage: 1000 - fixes P2P offers not showing for users
- Add new i18n keys for automated deposit states in all 6 languages
2026-02-26 21:53:41 +03:00
pezkuwichain 0f081545a8 fix: prettier formatting in translation files 2026-02-26 20:56:47 +03:00
pezkuwichain b711524d57 feat: add P2P deposit/withdraw flow for Telegram mini app
- New request-withdraw-telegram edge function (session token auth)
- New DepositWithdrawModal component with deposit/withdraw tabs
- Deposit: platform wallet display, TX hash verification, on-chain check
- Withdraw: token select, amount, fee display, balance validation
- BalanceCard: deposit/withdraw buttons always visible
- P2P section: modal state management and balance refresh on success
- p2p-api: verifyDeposit and requestWithdraw functions
- i18n: 24 new translation keys across all 6 languages
2026-02-26 20:33:31 +03:00
pezkuwichain 0606f93146 fix: resolve remaining lint errors in App.tsx and tr.ts
- Fix prettier formatting for lazy import in App.tsx
- Use double quotes for Turkish strings containing apostrophes
2026-02-26 19:13:55 +03:00
pezkuwichain 0b72cc4a4d fix: resolve ESLint/Prettier issues in P2P components
- Fix prettier formatting across all P2P files
- Fix setState-in-useEffect by using useCallback pattern
- Add missing React import for keyboard event type
- Wrap fetch functions in useCallback for exhaustive-deps
2026-02-26 19:03:59 +03:00
pezkuwichain 31e768de45 feat: integrate P2P trading into Telegram mini app
- Add 8 Supabase edge functions for P2P operations (get-internal-balance,
  get-payment-methods, get-p2p-offers, accept-p2p-offer, get-p2p-trades,
  trade-action, p2p-messages, p2p-dispute)
- Add frontend P2P API layer (src/lib/p2p-api.ts)
- Add 8 P2P components (BalanceCard, OfferList, TradeModal, CreateOfferModal,
  TradeView, TradeChat, DisputeModal, P2P section)
- Embed P2P as internal section in App.tsx instead of external link
- Remove old P2PModal component
- Add ~70 P2P translation keys across all 6 languages
2026-02-26 18:38:12 +03:00
pezkuwichain 2fbbce192f fix: prioritize URL path over localStorage for language detection
Bot keyboard sends language via URL path (/tr, /ar, etc.).
Previously localStorage was checked first, so once a user had
'en' saved, clicking a different language button in the bot had
no effect. Now URL path always wins over localStorage.
2026-02-25 19:46:10 +03:00
pezkuwichain fad8291c90 fix: restore URL path language detection for Telegram bot links
Bot sends users to /tr, /ar, /en etc. Previous commit removed URL path
detection entirely, breaking language selection from bot. Now URL path is
checked as secondary source (after localStorage), consumed once, persisted
to localStorage, and cleaned from the URL to prevent WebView cache issues.
2026-02-25 19:16:47 +03:00
pezkuwichain 1be1c252e0 fix: correct referral link bot username to pezkuwichainBot 2026-02-24 00:09:04 +03:00
pezkuwichain 480b5fe96b feat: P2P E2E test suite + edge function RPC fix + balance tx constraint update
- Fix process-withdraw and verify-deposit-telegram to use RPC_ENDPOINT
  env var defaulting to Asset Hub (wss://asset-hub-rpc.pezkuwichain.io)
- Add P2P E2E test script (scripts/p2p-e2e-test.py) covering full flow:
  offer creation, trade accept, payment, escrow release, cancel, visa
  user trade, and withdrawal request
- Update p2p_balance_transactions transaction_type check constraint
  to include withdraw_lock, withdraw_complete, dispute_refund
2026-02-23 21:21:12 +03:00
pezkuwichain c72782793a fix: use localStorage instead of URL path for language persistence
Telegram WebView caches URL and strips #tgWebAppData hash on reopens,
causing empty initData when URL path contained language prefix like /en.
2026-02-22 21:04:29 +03:00
pezkuwichain f2b809cb7c feat: add HEZ staking reward claim functionality
- Add staking-rewards.ts with unclaimed era detection and payoutStakers
- Show unclaimed rewards with per-era claim buttons in Scores tab
- Support batch claim via utility.batchAll
- Add translations for 6 languages
2026-02-21 18:35:05 +03:00
pezkuwichain a14bd57bbe feat: add PEZ epoch rewards display and claim functionality 2026-02-21 17:53:30 +03:00
pezkuwichain 123183038f fix: show total HEZ balance in card, use RC free for send tab
- Balance card shows RC + AH + staked total with staked note
- Tokens section shows free balances only
- Send tab checks against RC free balance to prevent failed transfers
2026-02-21 15:12:08 +03:00
pezkuwichain 9a2f74b783 fix: show total HEZ balance across RC + AH free + AH staked 2026-02-21 14:44:51 +03:00
pezkuwichain de6f41263c feat: migrate staking to Asset Hub and add citizen count card
- HEZStakingModal: switch all staking queries/tx from RC api to assetHubApi
- Add citizen count card to Rewards overview (Hejmara Kurd Le Cihane)
- Add getCitizenCount() to fetch total citizens from People Chain
- Add translations for citizen count card (6 languages)
2026-02-21 02:55:07 +03:00
pezkuwichain ef8132c82a feat: add Start Tracking and Record Trust Score buttons to Scores tab 2026-02-20 02:27:53 +03:00
pezkuwichain 714b234c76 fix: remove unreliable isEmpty check for enum KYC status 2026-02-20 01:35:04 +03:00
pezkuwichain d2969c1062 feat: add confirmCitizenship step to Rewards section 2026-02-20 01:21:26 +03:00
pezkuwichain dbd081ee64 fix: use GITHUB_TOKEN instead of PAT_TOKEN for branch sync 2026-02-19 06:21:32 +03:00
pezkuwichain 73ab592b13 ci: add sync-branches workflow to keep main and master in sync 2026-02-19 05:56:04 +03:00
pezkuwichain fca4fb231b fix: align referral and tiki score formulas with pallet source code 2026-02-17 02:33:56 +03:00
pezkuwichain db3ed21970 fix: show real staking score from CachedStakingDetails instead of hardcoded 0 2026-02-17 02:13:53 +03:00
pezkuwichain 9b97c63a26 feat: 3-state staking score UI with cached data support 2026-02-17 01:56:49 +03:00
pezkuwichain 0f63c96b2c feat: add standalone explorer page at /explorer 2026-02-16 01:27:40 +03:00
pezkuwichain b3241005ba ci: skip VPS1 deploy, only deploy to telegram.pezkiwi.app 2026-02-15 04:12:21 +03:00
pezkuwichain 0f8541b6f5 fix: preserve /citizens path in i18n URL rewriting 2026-02-15 00:14:54 +03:00
pezkuwichain e93cb143e2 fix: deploy pezkiwi.app to correct VPS (VPS2) 2026-02-15 00:06:30 +03:00
pezkuwichain 8f4b9087f3 feat: simplify Be Citizen flow - remove wallet steps, add seed phrase input
- Remove wallet setup/create/import/connect steps from CitizenPage
- Add privacy notice banner with Shield icon to form
- Add seed phrase textarea with mnemonic validation
- CitizenProcessing creates keypair directly from seed phrase
- CitizenSuccess shows 3-step next process info
- Add /citizens path support alongside ?page=citizen
- Update bot URL to /citizens
- Add 10 new i18n keys in all 6 languages
2026-02-14 23:24:59 +03:00
pezkuwichain f864ed6804 feat: update Be Citizen to new applyForCitizenship API
- Single tx (applyForCitizenship) instead of 2-step setIdentity+applyForKyc
- Keccak-256 identity hash via js-sha3
- Referral code replaced with referrer SS58 address
- Success screen shows pending referral status instead of citizen ID
- Updated all 6 translation files with new keys
2026-02-14 22:00:32 +03:00
pezkuwichain 59d4f3e6a1 fix: preserve query params in i18n URL, make seed phrase copyable in bot 2026-02-14 21:08:28 +03:00