diff --git a/client/package.json b/client/package.json index b8e2e40..7f35259 100644 --- a/client/package.json +++ b/client/package.json @@ -13,7 +13,7 @@ "@cartridge/connector": "0.6.0", "@cartridge/controller": "0.6.0", "@dojoengine/core": "^1.0.0", - "@dojoengine/torii-client": "^1.0.11", + "@dojoengine/torii-client": "^1.1.3", "@dojoengine/utils": "^1.0.0", "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 6534a90..874d874 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: ^1.0.0 version: 1.0.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.6.2) '@dojoengine/torii-client': - specifier: ^1.0.11 - version: 1.0.11 + specifier: ^1.1.3 + version: 1.1.3 '@dojoengine/utils': specifier: ^1.0.0 version: 1.0.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.6.2)(zod@3.23.8) @@ -500,11 +500,11 @@ packages: '@dojoengine/recs@2.0.13': resolution: {integrity: sha512-Cgz4Unlnk2FSDoFTYKrJexX/KiSYPMFMxftxQkC+9LUKS5yNGkgFQM7xu4/L1HvpDAenL7NjUmH6ynRAS7Iifw==} - '@dojoengine/torii-client@1.0.11': - resolution: {integrity: sha512-s15fd6cRiT2eACiyYwbnDYyD7F3J+L6E+Sc1HGLTDHVoHyOP8u1OSaTlr3odZHd0NIYuYiHVEfv/ZkY1046R2w==} + '@dojoengine/torii-client@1.1.3': + resolution: {integrity: sha512-rrALcqQWvxp+yIkn+LMVkoaKurr61AnXA2wLrTjuD93wPgkFa8t6qeUlysuHDr7WsnSIqnw94b34hNqbsIw1kQ==} - '@dojoengine/torii-wasm@1.0.11': - resolution: {integrity: sha512-xKpMo7fWQjTHFWSTNQdNqH0bVsgVrT1P8nM+euGTktOULGoIrg/cUS+822EDzxA33fdBmA8kY44xft9SUM5KGg==} + '@dojoengine/torii-wasm@1.1.3': + resolution: {integrity: sha512-1wbql9MN6+7aC+w3kYV26vBfkpR6sM2wDCf/9vwvVwQW1ERjl+efYXYBcNhMMecUtTaAxGMVKiW/r1fhImETOQ==} '@dojoengine/utils@1.0.0': resolution: {integrity: sha512-Muy1ozthnLpC2P4Nc0dGY1DqlLxRewTu9wQ2/9pf5bHl5IeGNRgG/OIav7fqn8vrVnqEtEKHJuOQrT1hIgPWNQ==} @@ -3973,11 +3973,11 @@ snapshots: - utf-8-validate - zod - '@dojoengine/torii-client@1.0.11': + '@dojoengine/torii-client@1.1.3': dependencies: - '@dojoengine/torii-wasm': 1.0.11 + '@dojoengine/torii-wasm': 1.1.3 - '@dojoengine/torii-wasm@1.0.11': {} + '@dojoengine/torii-wasm@1.1.3': {} '@dojoengine/utils@1.0.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.6.2)(zod@3.23.8)': dependencies: diff --git a/client/src/contexts/dojoContext.jsx b/client/src/contexts/dojoContext.jsx index b18271e..8b24635 100644 --- a/client/src/contexts/dojoContext.jsx +++ b/client/src/contexts/dojoContext.jsx @@ -97,7 +97,6 @@ export const DojoProvider = ({ children }) => { { const battle = useContext(BattleContext) const { enqueueSnackbar } = useSnackbar() - const { account } = useAccount() - const { connect, connectors } = useConnect(); const [toriiClient, setToriiClient] = useState(null) - let cartridgeConnector = connectors.find(conn => conn.id === "controller") + let provider = new RpcProvider({ nodeUrl: dojoConfig.rpcUrl }); const [txHashes, setTxHashes] = useState([]); const [step, setStep] = useState(0) @@ -53,7 +50,7 @@ export const ReplayProvider = ({ children }) => { return } - const receipt = await dojo.provider.waitForTransaction(txHash || txHashes[step], { retryInterval: 100 }) + const receipt = await provider.waitForTransaction(txHash || txHashes[step], { retryInterval: 100 }) if (!receipt) { enqueueSnackbar('Failed to load replay', { variant: 'error', anchorOrigin: { vertical: 'bottom', horizontal: 'right' } }) endReplay() @@ -204,6 +201,7 @@ export const ReplayProvider = ({ children }) => { [], false, (_, data) => { + console.log('data', data) if (Boolean(data[`${dojoConfig.namespace}-GameActionEvent`])) { let gameId = data[`${dojoConfig.namespace}-GameActionEvent`]["game_id"].value