Skip to content

Commit

Permalink
Merge pull request #192 from moonstream-to/getTransaction-fix
Browse files Browse the repository at this point in the history
increase check state attempts number
  • Loading branch information
Anton-Mushnin authored Apr 2, 2024
2 parents 06d796b + 2f22ac8 commit be502dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/src/tokenInterfaces/FullcountPlayerAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit be502dc

Please sign in to comment.