P2P Trading 5.2.7

25 January 2025

This release has upgrade notes. Read them before updating — they describe behaviour changes that need your attention.

BUG FIXESBALANCE LOCKINGCHAT SYSTEMUI/UX IMPROVEMENTS

P2P v5.2.7

Release Date: January 25, 2025 Tags: BUG FIXES, BALANCE LOCKING, CHAT SYSTEM, UI/UX IMPROVEMENTS

Upgrade Notes

Database migration required

IMPORTANT: This update requires dropping and recreating the p2p_trades table due to schema changes.

Steps to perform migration:

  1. Backup your database before proceeding
  2. Open phpMyAdmin and select your database
  3. Find the p2p_trades table in the table list and click "Drop"
  4. When the confirmation dialog appears, check the "Enable foreign key checks" checkbox (or similar option to disable foreign key constraints)
  5. Click "Yes" to confirm the drop operation
  6. Restart your application — the table will be recreated automatically with the correct schema

Changed

User Experience

  • Changed trade monitoring to update continuously

    • Trade status updates every 10 seconds
    • Message updates every 5 seconds
    • Automatic scroll to latest messages
    • Loading indicators during updates
  • Changed the interface for visual consistency

    • Consistent color scheme across all P2P pages
    • Better dark mode appearance
    • Cleaner, more professional look

Performance

  • Changed P2P trading operations for faster page loads, less unnecessary logging, better error handling and better response validation

Fixed

Balance Locking System

  • Fixed balance locking so seller funds are properly secured during trades

    • SELL offers: balance locked when the offer is created
    • BUY offers: balance locked when the trade starts
    • Buyers never have balance locked (they pay using external payment methods)
    • Full support for all wallet types (FIAT, SPOT, ECO) with proper balance management
    • Prevents double-spending and unauthorized withdrawals during active trades
  • Changed balance verification to ensure sellers have sufficient funds before a trade begins

    • Real-time balance checks before accepting trades
    • Prevents insufficient balance errors
    • Validates locked funds for active offers
    • Prevents double-locking of funds
    • Automatic wallet creation for missing wallets during trade initiation

Trade Chat System

  • Fixed message sending and retrieval

    • Messages now send successfully without errors
    • Chat history loads properly
    • Messages display with proper sender information
    • Real-time message updates every 5 seconds
  • Fixed message rendering

    • Messages now show unique identifiers
    • Proper timestamp formatting
    • Correct sender/receiver identification

Trade Display

  • Fixed errors when viewing trade details

    • Trade pages now load without "undefined" errors
    • Fixed redirect issues after creating a trade
    • Trade dashboard displays all data correctly
    • Proper handling of missing or malformed data
  • Fixed missing trader information

    • Avatar and name display correctly
    • Trading statistics show properly
    • Buyer/seller roles clearly identified
  • Fixed the trade event timeline

    • Timeline events now display in correct order
    • Event descriptions show properly
    • No more loading errors
  • Fixed parsing of trade configuration data

    • Amount, price, location and user requirements now parse correctly
    • Handles multiple levels of data encoding automatically
    • Prevents crashes from malformed configuration data

User Interface

  • Fixed text display throughout the P2P interface

    • Price display now shows "per USDT" with proper spacing
    • Counterparty stats show "0 trades" with proper spacing
    • All text elements have correct formatting
  • Changed the escrow fee display for clarity

    • Now shows "0.1 USDT (0.10 USD)" format for better understanding
    • Clear currency denomination
    • Accurate USD conversion
  • Fixed payment functionality for new trades

    • Payment option now available immediately after trade creation
    • No more "Payment Not Required" error for PENDING trades
    • Buyers can submit payment confirmation right away
  • Fixed incorrect "Limited Functionality" warnings

    • Warnings only show when features are actually disabled
    • No false alerts for properly configured features
  • Changed the trade creation form

    • Added bidirectional amount/total calculation (enter amount to get total, or enter total to get amount)
    • Real-time balance verification with feedback
    • Improved error messages for better clarity
    • Better handling of minimum and maximum trade limits

General

  • Fixed timezone warnings

    • Consistent date/time display across all P2P features
    • UTC timezone standardization
  • Changed error handling throughout the P2P system

    • Clear, user-friendly error messages
    • Proper validation feedback
    • Graceful error recovery