Skip to content

Commit 956aa15

Browse files
fix: prettier
1 parent e8fb00b commit 956aa15

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useSystemCalls } from "./useSystemCalls.ts";
1010

1111
export const useDojoStore = createDojoStore<Schema>();
1212

13-
function App({ db }: { db: SDK<Schema> }) {
13+
function App({ sdk }: { sdk: SDK<Schema> }) {
1414
const {
1515
account,
1616
setup: { client },
@@ -29,7 +29,7 @@ function App({ db }: { db: SDK<Schema> }) {
2929
let unsubscribe: (() => void) | undefined;
3030

3131
const subscribe = async () => {
32-
const subscription = await db.subscribeEntityQuery(
32+
const subscription = await sdk.subscribeEntityQuery(
3333
{
3434
dojo_starter: {
3535
Moves: {
@@ -71,12 +71,12 @@ function App({ db }: { db: SDK<Schema> }) {
7171
unsubscribe();
7272
}
7373
};
74-
}, [db, account?.account.address]);
74+
}, [sdk, account?.account.address]);
7575

7676
useEffect(() => {
7777
const fetchEntities = async () => {
7878
try {
79-
await db.getEntities(
79+
await sdk.getEntities(
8080
{
8181
dojo_starter: {
8282
Moves: {
@@ -111,7 +111,7 @@ function App({ db }: { db: SDK<Schema> }) {
111111
};
112112

113113
fetchEntities();
114-
}, [db, account?.account.address]);
114+
}, [sdk, account?.account.address]);
115115

116116
const moves = useModel(entityId, Models.Moves);
117117
const position = useModel(entityId, Models.Position);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { DojoContextProvider } from "./DojoContext.tsx";
1111
import { setupBurnerManager } from "@dojoengine/create-burner";
1212

1313
async function main() {
14-
const db = await init<Schema>(
14+
const sdk = await init<Schema>(
1515
{
1616
client: {
1717
rpcUrl: dojoConfig.rpcUrl,
@@ -34,7 +34,7 @@ async function main() {
3434
<DojoContextProvider
3535
burnerManager={await setupBurnerManager(dojoConfig)}
3636
>
37-
<App db={db} />
37+
<App sdk={sdk} />
3838
</DojoContextProvider>
3939
</StrictMode>
4040
);

packages/create-dojo/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"publishConfig": {
1111
"access": "public"
1212
},
13+
"files": [
14+
"dist"
15+
],
1316
"exports": "./dist/index.js",
1417
"bin": "./dist/index.js",
1518
"scripts": {

packages/create-dojo/src/commands/start.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env node
2-
31
import { Command } from "commander";
42
import path from "path";
53
import { promises as fs } from "fs";

packages/sdk/readme.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ const subscription = await sdk.subscribeEntityQuery(
5555
}
5656
}
5757
);
58-
59-
// Later, to unsubscribe
60-
subscription.unsubscribe();
6158
```
6259

6360
# Usage
@@ -259,9 +256,6 @@ const subscription = await sdk.subscribeEntityQuery(
259256
}
260257
}
261258
);
262-
263-
// Later, to unsubscribe
264-
subscription.unsubscribe();
265259
```
266260
267261
## Sending Signed Messages
@@ -274,7 +268,7 @@ you'll have to properly set `relayUrl` in the `init` function.
274268
// onchain_dash-Message is a composition of the ${namespace}-${Model} type you want to sign.
275269
// Here we take example of a chat because we don't want to load up those messages onchain
276270
// But keep in mind this could be any models defined in your cairo code
277-
const msg = db.generateTypedData("onchain_dash-Message", {
271+
const msg = sdk.generateTypedData("onchain_dash-Message", {
278272
identity: account?.address,
279273
content: toValidAscii(data.message),
280274
timestamp: Date.now(),

0 commit comments

Comments
 (0)