diff --git a/web/src/components/GameTicker.tsx b/web/src/components/GameTicker.tsx index 5bc26ad..31684a8 100644 --- a/web/src/components/GameTicker.tsx +++ b/web/src/components/GameTicker.tsx @@ -14,7 +14,10 @@ const GameTicker = (props: React.PropsWithChildren) => { useEffect(() => { if (!client || !game) return; const timer = setInterval(async () => { - const update = await Game.tick(client, game); + let update: Game.TickUpdate | undefined; + try { + update = await Game.tick(client, game); + } catch {} if (update === undefined) return; setGame((g: Game.Game): Game.Game | undefined => { if (!update) return; diff --git a/web/src/game.ts b/web/src/game.ts index 6a3191e..22d6c3e 100644 --- a/web/src/game.ts +++ b/web/src/game.ts @@ -205,5 +205,5 @@ const claimInactivity = async (client: SecretJS.SigningCosmWasmClient, game: Gam } }; -export type { Game, Round }; +export type { Game, Round, TickUpdate }; export { Stage, create, tick, playHandsign, claimInactivity, Result, defaults };