diff --git a/src/components/CreateGameCard/CreateCoinFlipGameCard.tsx b/src/components/CreateGameCard/CreateCoinFlipGameCard.tsx index fe33fe3..54c711e 100644 --- a/src/components/CreateGameCard/CreateCoinFlipGameCard.tsx +++ b/src/components/CreateGameCard/CreateCoinFlipGameCard.tsx @@ -121,7 +121,11 @@ export const CreateCoinFlipGameCard = ({ }).unwrap(); } const receipt = await createWagerAndDeposit({ - tokenAddress, wagerAsBigint: toBigIntInWei(String(wager), tokenDecimals), gameType, randomness: [convertBytesToNumber(drand.data.randomness)] }).unwrap(); + tokenAddress, + wagerAsBigint: toBigIntInWei(String(wager), tokenDecimals), + gameType, + randomness: [convertBytesToNumber(drand.data.randomness)] }).unwrap(); + const parsedTopicData = parseTopicDataFromEventLogs(receipt.logs, ['event GameCreation(bytes32 indexed escrowHash, uint256 indexed nonce, address creator, string name)']); await createGame({ gameType, diff --git a/src/libs/rtk/patch.js b/src/libs/rtk/patch.js new file mode 100644 index 0000000..0d27ec3 --- /dev/null +++ b/src/libs/rtk/patch.js @@ -0,0 +1,4 @@ +// eslint-disable-next-line no-undef +BigInt.prototype.toJSON = function() { + return this.toString() +} \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index 38b6a6a..fae2d07 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,3 +1,4 @@ +import './libs/rtk/patch.js' import React from "react" import ReactDOM from "react-dom/client" import App from "./containers/App";