Repository navigation
Feat/ Closes #333 freighter turn based client - #346
salazarsebas merged 26 commits into
Conversation
|
@Sycosmile Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
There was a problem hiding this comment.
Hey @Sycosmile, the pull request is looking good! You just need to make the following changes:
- clients/web/vite.config.ts:6 - import defineConfig from vitest/config instead of vite, since the test key is Vitest config.
- clients/web/tsconfig.app.json - add types: [vite/client] to compilerOptions. This fixes both the import.meta.env error in contract.ts:19 and the styles.css import error in main.tsx:4.
- clients/web/src/contract.ts:89 - simulation.result is accessed without narrowing the SimulateTransactionResponse union. Use a success type guard before reading .result.
- clients/web/src/game.test.ts:21 - the fixture object's status field widens to number instead of the GameStatus union. Type the fixture as GameState or cast the field.
Reproduce with cd clients/web && npm run build.
|
thank you so much for the coment i have done it |
salazarsebas
left a comment
There was a problem hiding this comment.
LGTM!
Clean rewrite on the review feedback - the Vitest config fix, the type guard on the simulation result, and the typed fixture all landed exactly as discussed, and the extra GameBoard render test for the win-lockout case was a nice addition beyond what was asked.
Thanks for the contribution!
If you have a minute, a star on https://github.com/salazarsebas/Cougr helps the project keep growing. Community chat: https://t.me/cougrengine
Closes #333
What this adds
Adds a small web client for the turn-based template that connects to Freighter and interacts directly with the Soroban contract.
Included
init_game,make_move, andget_statemake_movetransactionsScope
This stays within the issue scope. It does not add custodial keys, Studio functionality, Godot support, a general component renderer, or configurable board sizes.
Verification
mainLocal npm verification could not be completed because the environment could not resolve GitHub/npm dependencies, so no unverified test results are being claimed.