mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-24 17:48:34 +02:00
fix: Open SHOP modal on START GAME if payout address already set and no credits available
This commit is contained in:
@@ -499,7 +499,11 @@ class SocketHandlers {
|
||||
const payoutEligible = (this.gameModeManager.gameMode === 'PAID_SINGLE') || (this.gameModeManager.gameMode === 'PAID_CREDITS' && this.gameModeManager.creditsPayoutEnabled);
|
||||
if (payoutEligible) {
|
||||
try {
|
||||
const dbUser = await this.gameModeManager.getOrCreateUser(socket.id);
|
||||
// Use session cache first (populated during connection/resume), then fall back to DB
|
||||
let dbUser = this.sessionManager ? await this.sessionManager.getBySocket(socket.id) : null;
|
||||
if (!dbUser) {
|
||||
dbUser = await this.gameModeManager.getOrCreateUser(socket.id);
|
||||
}
|
||||
if (!dbUser.payout_address) {
|
||||
this.broadcastManager.sendStatusUpdate(socket.id, 'payment', '⚠️ Use the "Manage Payout Address" button or paste your payout address here and type confirm. Payment request will appear automatically.');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user