fix(player): harden realtime auth and refactor hall betting
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user