Skip to content

Commit

Permalink
Merge pull request #308 from dojoengine/torii-bump
Browse files Browse the repository at this point in the history
fix: create dojo issue, syscalls
  • Loading branch information
ponderingdemocritus authored Oct 30, 2024
2 parents a8e4528 + e8d4d3e commit 17a1abe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/example-vite-react-sdk/src/useSystemCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export const useSystemCalls = () => {

// Apply an optimistic update to the state
// this uses immer drafts to update the state
state.applyOptimisticUpdate(
transactionId,
(draft) =>
(draft.entities[entityId].models.dojo_starter.Moves!.remaining =
remainingMoves)
);
state.applyOptimisticUpdate(transactionId, (draft) => {
if (draft.entities[entityId]?.models?.dojo_starter?.Moves) {
draft.entities[entityId].models.dojo_starter.Moves.remaining =
remainingMoves;
}
});

try {
// Execute the spawn action from the client
Expand Down
6 changes: 6 additions & 0 deletions packages/create-dojo/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*

!dist/**
!package.json
!readme.md
!tsup.config.ts

0 comments on commit 17a1abe

Please sign in to comment.