fix(player): harden realtime auth and refactor hall betting

This commit is contained in:
wchino
2026-07-22 01:40:37 +08:00
parent 5ef2e09b04
commit 508b28df22
12 changed files with 1319 additions and 1093 deletions

View File

@@ -45,7 +45,7 @@ export function usePlayerBalanceWs(): void {
}
const channelName = `player.${playerId}`;
const channel = echo.channel(channelName);
const channel = echo.private(channelName);
const onBalanceUpdate = (evt: BalanceUpdateWsEvent): void => {
const currency = evt.currency_code?.trim().toUpperCase();
@@ -75,6 +75,7 @@ export function usePlayerBalanceWs(): void {
return () => {
channel.stopListening(".balance.update");
echo.leave(channelName);
};
}, [activeCurrency, bearerToken, playerId, t]);
}