Skip to content

Commit 044e2a1

Browse files
fix: update other examples
1 parent c3f10ed commit 044e2a1

File tree

5 files changed

+11
-10
lines changed
  • examples
    • react
      • react-phaser-example/src/dojo/generated
      • react-pwa-app/src/dojo/generated
      • react-threejs/src/dojo/generated
      • starknet-react-app/src/dojo/generated
    • vue/vue-app/src/dojo/generated

5 files changed

+11
-10
lines changed

examples/react/react-phaser-example/src/dojo/generated/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type SetupResult = Awaited<ReturnType<typeof setup>>;
1616

1717
export async function setup({ ...config }: DojoConfig) {
1818
// torii client
19-
const toriiClient = await torii.createClient([], {
19+
const toriiClient = await torii.createClient({
2020
rpcUrl: config.rpcUrl,
2121
toriiUrl: config.toriiUrl,
2222
relayUrl: config.relayUrl,
@@ -33,7 +33,7 @@ export async function setup({ ...config }: DojoConfig) {
3333
const sync = await getSyncEntities(
3434
toriiClient,
3535
contractComponents as any,
36-
[]
36+
undefined // syncs all entities
3737
);
3838

3939
const client = await setupWorld(

examples/react/react-pwa-app/src/dojo/generated/setup.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type SetupResult = Awaited<ReturnType<typeof setup>>;
1717

1818
export async function setup({ ...config }: DojoConfig) {
1919
// torii client
20-
const toriiClient = await torii.createClient([], {
20+
const toriiClient = await torii.createClient({
2121
rpcUrl: config.rpcUrl,
2222
toriiUrl: config.toriiUrl,
2323
relayUrl: config.relayUrl,
@@ -30,11 +30,12 @@ export async function setup({ ...config }: DojoConfig) {
3030
// create client components
3131
const clientComponents = createClientComponents({ contractComponents });
3232

33+
// fetch all existing entities from torii
3334
// fetch all existing entities from torii
3435
const sync = await getSyncEntities(
3536
toriiClient,
3637
contractComponents as any,
37-
[]
38+
undefined // syncs all entities
3839
);
3940

4041
// create dojo provider

examples/react/react-threejs/src/dojo/generated/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type SetupResult = Awaited<ReturnType<typeof setup>>;
2323

2424
export async function setup({ ...config }: DojoConfig) {
2525
// torii client
26-
const toriiClient = await torii.createClient([], {
26+
const toriiClient = await torii.createClient({
2727
rpcUrl: config.rpcUrl,
2828
toriiUrl: config.toriiUrl,
2929
relayUrl: config.relayUrl,
@@ -40,7 +40,7 @@ export async function setup({ ...config }: DojoConfig) {
4040
const sync = await getSyncEntities(
4141
toriiClient,
4242
contractComponents as any,
43-
[]
43+
undefined // syncs all entities
4444
);
4545

4646
const dojoProvider = new DojoProvider(config.manifest, config.rpcUrl);

examples/react/starknet-react-app/src/dojo/generated/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type SetupResult = Awaited<ReturnType<typeof setup>>;
1616

1717
export async function setup({ ...config }: DojoConfig) {
1818
// torii client
19-
const toriiClient = await torii.createClient([], {
19+
const toriiClient = await torii.createClient({
2020
rpcUrl: config.rpcUrl,
2121
toriiUrl: config.toriiUrl,
2222
relayUrl: "",
@@ -33,7 +33,7 @@ export async function setup({ ...config }: DojoConfig) {
3333
const sync = await getSyncEntities(
3434
toriiClient,
3535
contractComponents as any,
36-
[]
36+
undefined
3737
);
3838

3939
// create dojo provider

examples/vue/vue-app/src/dojo/generated/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type SetupResult = Awaited<ReturnType<typeof setup>>;
1616

1717
export async function setup({ ...config }: DojoConfig) {
1818
// torii client
19-
const toriiClient = await torii.createClient([], {
19+
const toriiClient = await torii.createClient({
2020
rpcUrl: config.rpcUrl,
2121
toriiUrl: config.toriiUrl,
2222
relayUrl: "",
@@ -33,7 +33,7 @@ export async function setup({ ...config }: DojoConfig) {
3333
const sync = await getSyncEntities(
3434
toriiClient,
3535
contractComponents as any,
36-
[]
36+
undefined
3737
);
3838

3939
// create dojo provider

0 commit comments

Comments
 (0)