📖 star365 Docs
← 보고서 목록

Stage8 ewallet UI Fix Sprint Report (2026-05-06)

Background and Trigger

User ok1000 (id=25) screen showed: deposits 281.51 USDT / withdrawals 0 / available 197.51 = arithmetic mismatch. Root cause: API queried only ewallet_commission_histories (positive) and ewallet_purchase_histories (mostly empty), missing transfer in/out, BSC deposits, stage purchase deductions, and payout requests.

Precision Audit Findings

Data source mapping discovered

Source Affects cash_point API used (BEFORE) API uses (AFTER)
1127_deposit_transactions (BSC/TRON confirmed) YES NO YES
1127_ewallet_commission_histories amount > 0 YES YES YES
1127_cashpoint_wallet_transfer_histories type=credit YES NO YES
1127_cashpoint_wallet_transfer_histories type=debit YES NO YES
1127_payout_release_requests amount + fee YES NO YES
1127_purchased_membership_details YES NO YES

Key insight: original API used legacy ewallet_transfer_histories which is NOT the source of cash_point ledger. After P4 (2026-05-05) cash_point became single wallet, all real movement is in cashpoint_wallet_* tables.

Reconciliation across 13 users

user_id username actual cash_point totalIncome totalExpenses gap
25 ok1000 198.71 1129.71 931.00 0.00 PASS
272 ok2949 30.00 60.00 30.00 0.00 PASS
514 ok6137 30.00 30.00 0.00 0.00 PASS
5 master 448.56 1378.56 930.00 0.00 PASS
4 stage8 1239.36 2169.36 930.00 0.00 PASS
288 yj7717 37.50 67.50 30.00 0.00 PASS
243 bjs5887 3.00 93.00 90.00 0.00 PASS
43 star365 121.29 976.29 872.00 -17.00
10 ljm5177 41.39 327.39 316.00 -30.00
45 kstone0675 10.80 220.80 264.00 -54.00
12 lst6485 108.60 258.60 210.00 -60.00
6 garnet 133.80 253.80 210.00 -90.00
3 a01071540697 25.22 830.67 978.85 -173.40

Result: 8 of 13 users PASS (gap = 0). Remaining 5 users have non-zero gap from invisible admin-side cash_point adjustments (initial credit at signup or admin debits not recorded in any observable table). Cards still show accurate sums of all observable transactions.

Empty / unused tables verified (no signal source)

Files Modified

A. API: /home/stage8-user/src/app/api/user/ewallet/route.ts (8828 -> 11754 bytes)

B. UI: /home/stage8-user/src/app/(user)/ewallet/page.tsx (cash tab labels only)

C. 8 locale files: /home/stage8-user/src/messages/{ko,en,zh,ja,vi,th,ru,hi}.json

Build and Restart

Health Check

Backup Files

All in /home/stage8-user/ with suffix .bak-uifix-20260506:

Live Impact

PENDING (next sprint candidates)

  1. Resolve admin-credit residual gap for 5 users by introducing admin_cashpoint_adjustment_log table or routing all admin manual credits through ewallet_commission_histories (amount_type = admin_manual_credit) consistently.
  2. Surface incomeBreakdown / expenseBreakdown on UI: clicking a card expands to 6 sub-cards.
  3. Tron wallet transaction history: currently shows No transactions; needs separate source wiring.