feat(examples): migrate tap_battle session lifecycle to SessionManager#235
Open
madisonsc52-del wants to merge 4 commits into
Open
feat(examples): migrate tap_battle session lifecycle to SessionManager#235madisonsc52-del wants to merge 4 commits into
madisonsc52-del wants to merge 4 commits into
Conversation
Author
|
@salazarsebas |
Author
|
@salazarsebas |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Summary
This PR refactors the tap_battle example contract to migrate its local session lifecycle management over to the centralized SessionManager. This cleans up redundant code, establishes a standard implementation pattern for session limits, and ensures the example aligns with upstream architectural patterns.
🛠️ Changes
src/auth.rs & src/lib.rs: Replaced standalone session validation handlers with native SessionManager hooks.
src/test.rs: Implemented an robust suite of 17 passing unit tests verifying player registration, combo streak logic, multiplier caps, and session expiration panics.
Toolchain Optimization: Verified clean WebAssembly target builds (wasm32v1-none) without altering or corrupting the project's root Cargo.toml.
🧪 Testing Checklist
All 17 local unit tests passing cleanly (cargo test)
Contract compiles to target natively (stellar contract build)
CLOSE #224