Commit Graph
104 Commits
Author SHA1 Message Date
jwinterm f2b107fc5f fix stale smirk and amount bug 2026-03-01 13:56:35 -05:00
jwinterm a61851b0f7 add smirk payments and leaderboard and diff tuning 2026-02-20 13:54:36 -05:00
jwinterm 27660d6948 Fix rewards, make tx hash clickable, add win payout notification, and add entry choice modal 2026-02-20 12:34:21 -05:00
jwinterm da6763886a fix credits display p3 and update .env.example 2026-02-20 11:11:51 -05:00
jwinterm 101083b9c1 fix stale cache possibly 2026-02-20 10:12:29 -05:00
jwinterm 1a714fd69d fix credits display 2026-02-20 09:36:55 -05:00
jwinterm ee5a037b84 fix credits logic 2026-02-20 09:21:13 -05:00
jwinterm 5776c58357 fix credits package bug and improve stale payment logic 2026-02-19 07:05:15 -05:00
jwinterm bc55f0355e fix edge cases and tests 2026-02-19 06:15:45 -05:00
jwinterm b6597a4a6e fix db query 2026-02-18 20:59:28 -05:00
jwinterm 727304996a fix live game list and swap animations 2026-02-18 20:57:01 -05:00
jwinterm 22b27b8b35 improve split script dry run and status 2026-02-18 19:35:01 -05:00
jwinterm 57ebe00dd7 fix split script 2026-02-18 19:24:38 -05:00
jwinterm 6860debe9a fix admin balance display 2026-02-18 19:20:00 -05:00
jwinterm ec3caabf1c feat: initial batch payout logic and output splitting script added 2026-02-18 07:30:46 -05:00
jwinterm bf5938c366 fix game entry and payout bugs 2026-02-18 06:35:32 -05:00
jwinterm d56ad7599b fix admin balance display 2026-02-17 20:21:32 -05:00
jwinterm 320d1a3b1f fix admin panel and credits package 2026-02-17 20:02:22 -05:00
jwinterm f8ae69304a fix smirk login 2026-02-07 11:40:07 -05:00
jwinterm a56063867e fix: chat scrollback and admin control 2026-02-03 12:02:52 -05:00
jwinterm 10dfd932d8 fix smirk auth 2026-02-02 17:17:10 -05:00
jwinterm 6cf3961da0 feat: add smirk toggle and more admin capabilities 2026-02-02 08:42:39 -05:00
jwinterm 022a175b83 update .env.example with balance stuff 2026-02-01 17:39:59 -05:00
jwinterm d27df3b6cf Feat: add IP-based rate limiting and house balance thresholds 2026-02-01 17:38:30 -05:00
jwinterm 9a53df4a35 Fix critical double pay bugs 2026-02-01 16:38:51 -05:00
jwinterm 4999ce2ac5 docs: add ALERT_FROM_EMAIL to .env.example 2026-02-01 16:13:16 -05:00
jwinterm 6e0f3e9012 fix: wallet display bug, add test email endpoint
- Fix wallet balance always showing 'Disconnected' in admin dashboard
- Always attempt balance fetch even if isHealthy=false
- Show error state with message instead of generic 'Disconnected'
- Add POST /api/admin/alerts/test-email endpoint to verify Resend config
- Move alertService to module scope for endpoint access
2026-02-01 15:59:30 -05:00
jwinterm a81c19c936 feat: admin dashboard, alert service, and docs reorganization
- Add alertService.js with Resend email alerts for low balance, disconnects, failed payouts
- Update admin.html with full dashboard UI (stats, charts, tables, payout retry)
- Add wallet balance to /health endpoint
- Add getBalance() and checkTransactionStatus() to walletRPCService
- Fix payoutRetryService query and add alert integration
- Update .env.example with alert config (RESEND_API_KEY, ADMIN_EMAIL, etc)
- Reorganize docs: move TODO.md, LOGS_AND_BACKUP.md to docs/
- Extract deployment guide from README to docs/DEPLOY.md
- Consolidate TEMP_TODO.md into docs/TODO.md
2026-01-31 20:21:28 -05:00
jwinterm 7573c300cd fix: smirk modal 2026-01-29 08:46:52 -05:00
jwinterm 36897b06cb fix: payout retry service query 2026-01-28 17:48:20 -05:00
jwinterm a072a3a049 fix: npm vulns 2026-01-28 17:40:42 -05:00
jwinterm c6425a6a47 remove hardcoded junkola p2 2026-01-28 17:33:51 -05:00
jwinterm 3aeb4fc2f1 fix: remove old files and hardcoded stuff 2026-01-28 17:33:51 -05:00
jwinterm 2286d8deff Feat: add smirk login
Fix: add security hardening and transaction database commits
2026-01-28 17:21:53 -05:00
jwinterm 64e2b45f89 fix: Duplicate address restored message 2026-01-14 08:42:16 -05:00
jwinterm 758d67e72e fix: table lookup and move some messages to debug mode 2026-01-14 08:17:47 -05:00
jwinterm 8fb5c58f9a Fix: History payments 2026-01-13 19:13:11 -05:00
jwinterm 38a7e58e96 fix: payment flow 2026-01-13 18:49:59 -05:00
jwinterm 37323c8683 fix: monster animation p3 2026-01-13 18:37:40 -05:00
jwinterm 12bc3d73d0 fix: monster animation p2 2026-01-13 18:09:04 -05:00
jwinterm 7bd32a929e fix: monster animation in awaiting payment 2026-01-13 18:04:32 -05:00
jwinterm 79cbc4b9e6 fix: Open SHOP modal on START GAME if payout address already set and no credits available 2026-01-13 17:58:14 -05:00
jwinterm e8e0405485 fix: START GAME shows shop modal instead of error when payment required
When both payment modes are enabled (mixed mode) and user has no credits
or confirmed payment, the 'choose_payment' action was falling through to
the error case. Now 'choose_payment' triggers the payment options modal
just like 'make_payment' and 'purchase_credits' do.
2026-01-13 17:46:59 -05:00
jwinterm 0c2d44d429 fix: Animation rendering issues - remove black tile backgrounds
- Replace asterisk (*) sparkles with floor tiles + bright golden color
- Remove skull emoji (☠) and death particles (% *) - use red flash effect
- Fix monster shadows causing black boxes - use red floor glow instead
- Replace 'ESCAPED!' emoji text with character-by-character transparent rendering
- Use GameTiles.getPlayerTile() instead of hardcoded '@'
- Use GameTiles.getMonsterTile() instead of hardcoded '~'

All tiles now render with proper transparency on floor tile base.
2026-01-13 17:32:46 -05:00
jwinterm afe2ac991a feat: Treasure hunt animation for 'Awaiting payment' state
New dedicated animation while waiting for payment:
- Player runs toward BIG pulsating golden treasure
- Player always grabs the treasure (with dramatic pickup moment)
- Monster pack (4-6 monsters) spawns from multiple directions
- 60% chance: player escapes with treasure to the exit
- 40% chance: player gets devoured by monster pack (skull/death effect)

Animation features:
- Massive golden aura around treasure with sparkle ring
- Player glows gold when carrying treasure
- Death particles expand outward on devour
- Monsters converge from edges (left, right, top, bottom)

Existing 'Awaiting next block' animation preserved unchanged.
2026-01-13 17:15:04 -05:00
jwinterm 404f5692d8 feat: Game reconnection/resume support
- Created SuspendedGameManager to preserve game state when users disconnect
- Games are keyed by DB userId (persistent) instead of ephemeral socketId
- handleDisconnect now suspends games for 5 minutes instead of deleting
- handleConnection restores suspended games on reconnect with session token
- Payment monitoring is restored for pending payments on reconnect
- Added hasActiveMonitoring() method to PaymentHandlers
- Queue entries preserved for users with active sessions/payments
- Updated TODO.md with reconnection feature documentation

Users in dungeon or awaiting payment can now close/refresh browser and
seamlessly resume within 5 minutes when reconnecting.
2026-01-13 17:06:35 -05:00
jwinterm ce58a33347 Fix payment bugs, add comprehensive tests, remove dead code
Payment Fixes:
- Prevent credits going negative with WHERE credits >= $1 check
- completeGame now uses recorded payment_mode from game record instead of global gameMode
- Add duplicate payout prevention by checking for existing payouts before processing

Dead Code Cleanup:
- Remove unused MoneroPayService (WalletRPCService is the actual service)
- Remove legacy MoneroPay references from comments

Tests:
- Add 50 comprehensive payment/payout tests (payment_payout_comprehensive.test.js)
- Expand WalletRPCService tests (4 -> 31 tests)
- Total: 106 tests passing across 10 test suites

Documentation:
- Update TODO.md with recent fixes and correct test counts
- Update migration comments to reflect actual wallet service used
2026-01-13 16:45:11 -05:00
jwinterm 9330b3b943 Fix direct payment game start, reduce prod logging, QR improvements
- Fix game start failure in direct payment mode when payment confirms
  before mempool detection (add player to queue if not already there)
- Fix debug logging in production: correct indentation in debugRegisteredUsers,
  swap console_logging config (false in prod, true in debug)
- Add close button to QR code container
- Auto-hide QR on payment detected, confirmed, and game start
2026-01-13 16:04:50 -05:00
jwinterm a91aed84a5 fix single game payment flow and tests 2026-01-08 15:57:47 -05:00
jwinterm 251ace4635 Fix: make reconnect more robust and make spectate window re-openable 2026-01-07 17:44:47 -05:00