Skip to content

Commit

Permalink
🗑️ cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Oct 26, 2023
1 parent 660965b commit c12fb1a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
},
"dependencies": {
"@dojoengine/core": "0.1.30",
"@dojoengine/create-burner": "^0.1.3",
"@dojoengine/react": "^0.0.3",
"@dojoengine/utils": "^0.1.2",
"@dojoengine/create-burner": "0.1.30",
"@dojoengine/react": "0.0.3",
"@dojoengine/utils": "0.1.2",
"@latticexyz/react": "^2.0.0-next.9",
"@latticexyz/recs": "^2.0.0-next.9",
"@latticexyz/utils": "^2.0.0-next.9",
Expand Down
22 changes: 16 additions & 6 deletions src/dojo/createSystemCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export function createSystemCalls(
set_turn: (mob: TileType) => void
) => {
try {
console.log(import.meta.env.VITE_PUBLIC_ACTIONS_ADDRESS);
console.log(import.meta.env.VITE_PUBLIC_WORLD_ADDRESS);
const calls: Call[] = [
{
contractAddress: import.meta.env.VITE_PUBLIC_ACTIONS_ADDRESS || '',
Expand Down Expand Up @@ -388,16 +386,28 @@ export async function setComponentsFromEvents(components: Components, events: Ev

switch (componentName) {
case 'Map':
transformedEvents.push({ ...handleMapEvent(keys, values), ...baseEventData });
transformedEvents.push({
...handleMapEvent(keys, values),
...baseEventData,
});
break;
case 'Game':
transformedEvents.push({ ...handleGameEvent(keys, values), ...baseEventData });
transformedEvents.push({
...handleGameEvent(keys, values),
...baseEventData,
});
break;
case 'Tile':
transformedEvents.push({ ...handleTileEvent(keys, values), ...baseEventData });
transformedEvents.push({
...handleTileEvent(keys, values),
...baseEventData,
});
break;
case 'Character':
transformedEvents.push({ ...handleCharacterEvent(keys, values), ...baseEventData });
transformedEvents.push({
...handleCharacterEvent(keys, values),
...baseEventData,
});
break;
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/dojo/setupNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import { world } from './world';

export type SetupNetworkResult = Awaited<ReturnType<typeof setupNetwork>>;

export const getContractByName = (name: string) => {
return manifest.contracts.find((contract) => contract.name === name);
};

export async function setupNetwork() {
// Extract environment variables for better readability.
const { VITE_PUBLIC_WORLD_ADDRESS, VITE_PUBLIC_NODE_URL, VITE_PUBLIC_TORII } = import.meta.env;
Expand Down

0 comments on commit c12fb1a

Please sign in to comment.