16 Commits

Author SHA1 Message Date
pezkuwichain 0ca56b8fe4 fix: login button now supports session_token from URL 2026-02-06 04:45:57 +03:00
pezkuwichain 5236f8c470 fix: use session_token for miniapp auth instead of from_miniapp
- loginViaParams now accepts session_token from URL
- Removes insecure from_miniapp parameter
- Aligns with telegram-auth security update
2026-02-06 04:35:12 +03:00
pezkuwichain 2cef7b44fc feat: replace deposit/withdraw with trusted seller/buyer buttons
Links to Telegram group t.me/pezhezbuysel for P2P trading with
trusted agents in user's local area.
2026-02-05 05:50:07 +03:00
pezkuwichain 4afa0d786d refactor: compact horizontal layout for offer cards 2026-02-03 23:00:50 +03:00
pezkuwichain 0bcdf5740b feat: use Edge Functions for P2P operations with Telegram auth
- createFiatOffer: Uses create-offer-telegram Edge Function
- AdList: Uses get-my-offers Edge Function for "my-ads" tab
- Added adType parameter to CreateOfferParams

Fixes RLS issues where Telegram auth doesn't set auth.uid().
2026-02-03 22:10:03 +03:00
pezkuwichain 549d97b90c fix: use auth_user_id for P2P balance queries 2026-02-03 20:24:55 +03:00
pezkuwichain 65c9fb542a Add CodeQL analysis workflow configuration 2026-02-03 20:06:34 +03:00
pezkuwichain 5dec04c861 feat: use verify-deposit-telegram for Telegram session auth 2026-02-03 20:01:52 +03:00
pezkuwichain 6055a4a109 fix: update escrow address to Treasury_3
Use controlled wallet address for P2P deposits/withdrawals
2026-02-03 16:50:05 +03:00
pezkuwichain c6b18b4f11 fix: use Telegram auth user ID instead of Supabase Auth
- Add setCurrentUserId/getCurrentUserId helpers for Telegram-based auth
- Update all p2p-fiat functions to use getCurrentUserId()
- AuthContext sets currentUserId on login/logout
- Fallback to supabase.auth.getUser() for web compatibility

This allows p2p-fiat functions to work with Telegram-only authentication
where users don't have a Supabase Auth session.
2026-02-03 12:25:28 +03:00
pezkuwichain 4074e7a884 feat: add full p2p-fiat library with escrow support
- Copy complete p2p-fiat.ts from pwap/shared with all functions
- Add createFiatOffer with internal ledger escrow lock
- Add AES-256-GCM encryption for payment details
- Add audit logging, reputation management
- Update CreateAd.tsx to use createFiatOffer instead of direct insert
- Remove unused wallet context from CreateAd
2026-02-03 12:17:33 +03:00
pezkuwichain 8676e947a5 fix: use 'address' instead of 'account' from WalletContext
WalletContext exports 'address' not 'account', causing CreateAd to fail
when checking if user has a wallet address.
2026-02-03 12:12:12 +03:00
pezkuwichain 9223c719cc fix: improve dark mode styling and contrast
- Set dark mode as default (class="dark" on html)
- Update dark mode CSS variables for better contrast
- Fix popover/select dropdown colors
- Improve SelectItem hover and focus states
2026-02-01 23:24:09 +03:00
pezkuwichain fcbf668327 fix: add identity library and fix import paths
- Create src/lib/identity.ts with types and functions for KYC/reputation
- Fix @pezkuwi/lib imports to use @/lib alias
- Fix wallet context usage (account -> address)
2026-02-01 23:02:39 +03:00
pezkuwichain 8add193aa1 feat: mobile-optimized P2P with URL param auth support
- Remove blockchain dependencies (@pezkuwi/api)
- Use internal ledger for P2P trades
- Add URL param authentication from mini-app redirect
- State-based navigation instead of react-router-dom
- Simplified deposit/withdraw modals
2026-01-31 09:38:20 +03:00
pezkuwichain bc7ab9b2a4 Initial P2P mobile frontend
- Copy P2P components from pwap/web
- Mobile-optimized P2P trading interface
- To be deployed at telegram.pezkuwichain.io/p2p
2026-01-31 08:51:45 +03:00