Repository navigation
docs(escrow): add warning on is_funded usage for in-progress match gating - #1883
Merged
famvilianity-eng merged 1 commit intoOct 23, 2026
Conversation
…ting - Add warning to README is_funded section advising callers to check match.state instead of is_funded - Add # Warning doc comment to is_funded in contracts/escrow/src/lib.rs - Add assertion in test_is_funded_returns_true_after_payout to verify match.state != Active - Update docs/architecture.md is_funded reference table Closes StellarCheckMate#1791
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 of Changes
This PR resolves the security documentation ambiguity around
is_fundedwhere callers could mistakenly assume a match is in progress when it has already completed.README.md: Replaced the misleading sentence gating game-start logic with a prominent warning callout:> **Warning:** Do not use this function to determine if a match is in progress — checkmatch.stateinstead.contracts/escrow/src/lib.rs: Added a matching# Warningsection in the doc comment abovepub fn is_funded.contracts/escrow/src/tests/lifecycle.rs: Added explicit assertion intest_is_funded_returns_true_after_payoutvalidating that callers must inspectmatch.staterather thanis_fundedto determine if a match is active.docs/architecture.md: Updated theis_fundedrow in the public function reference table to ensure full doc-conformance.Closes #1791