Skip to content

Commit 87f6b2c

Browse files
committed
feat(types): fix provider + handle CairoCustomEnum
1 parent 17df0bb commit 87f6b2c

File tree

12 files changed

+7581
-44
lines changed

12 files changed

+7581
-44
lines changed

examples/example-vite-react-sdk/src/App.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { WalletAccount } from "./wallet-account.tsx";
1212
import { useSystemCalls } from "./useSystemCalls.ts";
1313
import { Events } from "./events.tsx";
1414
import { HistoricalEvents } from "./historical-events.tsx";
15+
import { dojoProvider } from "./types.ts";
1516

1617
/**
1718
* Main application component that provides game functionality and UI.
@@ -23,7 +24,6 @@ function App() {
2324
const { useDojoStore, client } = useDojoSDK();
2425
const { account } = useAccount();
2526
const entities = useDojoStore((state) => state.entities);
26-
console.log(entities);
2727

2828
const { spawn } = useSystemCalls();
2929

@@ -117,10 +117,9 @@ function App() {
117117
className={`${col} h-12 w-12 bg-gray-600 rounded-full shadow-md active:shadow-inner active:bg-gray-500 focus:outline-none text-2xl font-bold text-gray-200`}
118118
key={idx}
119119
onClick={async () => {
120-
await client.actions.move(
121-
account!,
122-
direction
123-
);
120+
await dojoProvider.move(account!, {
121+
direction: direction,
122+
});
124123
}}
125124
>
126125
{label}

0 commit comments

Comments
 (0)