Skip to content

Commit

Permalink
fixup! feat: fix token decimal bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
RasenGUY committed Dec 6, 2023
1 parent 68bd761 commit a05162b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/components/CreateGameCard/CreateCoinFlipGameCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ export const CreateCoinFlipGameCard = ({

const navigateToGameUi = useNavigateTo()
useEffect(() => {
console.log(!isWagerApproved(toBigIntInWei(allowanceQuery.data.toString(), tokenDecimals), toBigIntInWei(String(watch('wager')), tokenDecimals)))
console.log(toBigIntInWei(String(watch('wager')), tokenDecimals).toString())
if(playerAddress && tokenAddress && tokenDecimals) {
allowanceQuery.refetch();
if(createGameStatus === 'fulfilled' && createGameResponse) {
Expand Down
2 changes: 0 additions & 2 deletions src/components/JoinGameCard/JoinCoinFlipGameCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ const JoinCoinFlipGameCard = ({

const navigateToGameUi = useNavigateTo()
useEffect(() => {
console.log(allowanceQuery?.data, toBigInt(wagerAmount))

allowanceQuery.refetch();
if(tokenDecimals) setValue('wager', Number(parseFloat(formatUnits(BigInt(wagerAmount), tokenDecimals)).toFixed(0)))
}, [
Expand Down

0 comments on commit a05162b

Please sign in to comment.