From 2f22ac8ca30e93cdec058501b5d8b74f94968960 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Tue, 2 Apr 2024 11:35:20 +0300 Subject: [PATCH] increase check state attempts number --- web/src/tokenInterfaces/FullcountPlayerAPI.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/tokenInterfaces/FullcountPlayerAPI.ts b/web/src/tokenInterfaces/FullcountPlayerAPI.ts index a29407c2..47fdb5ca 100644 --- a/web/src/tokenInterfaces/FullcountPlayerAPI.ts +++ b/web/src/tokenInterfaces/FullcountPlayerAPI.ts @@ -255,7 +255,7 @@ export const commitOrRevealPitchFullcountPlayer = ({ const { gameContract } = getContracts(); let isSuccess = false; if (!isCommit) { - for (let attempt = 1; attempt <= 5; attempt++) { + for (let attempt = 1; attempt <= 10; attempt++) { const sessionState = await gameContract.methods.SessionState(sessionID).call(); if (sessionState.didPitcherReveal) { isSuccess = true; @@ -270,7 +270,7 @@ export const commitOrRevealPitchFullcountPlayer = ({ throw new Error("Reveal: FCPlayerAPI success, sessionState unchanged in 20sec"); } } else { - for (let attempt = 1; attempt <= 5; attempt++) { + for (let attempt = 1; attempt <= 10; attempt++) { const sessionState = await gameContract.methods.SessionState(sessionID).call(); if (sessionState.didPitcherCommit) { isSuccess = true; @@ -335,7 +335,7 @@ export const commitOrRevealSwingFullcountPlayer = ({ const { gameContract } = getContracts(); let isSuccess = false; if (!isCommit) { - for (let attempt = 1; attempt <= 5; attempt++) { + for (let attempt = 1; attempt <= 10; attempt++) { const sessionState = await gameContract.methods.SessionState(sessionID).call(); if (sessionState.didBatterReveal) { isSuccess = true; @@ -348,7 +348,7 @@ export const commitOrRevealSwingFullcountPlayer = ({ throw new Error("Reveal: FCPlayerAPI success, sessionState unchanged in 20sec"); } } else { - for (let attempt = 1; attempt <= 5; attempt++) { + for (let attempt = 1; attempt <= 10; attempt++) { const sessionState = await gameContract.methods.SessionState(sessionID).call(); if (sessionState.didBatterCommit) { isSuccess = true;