Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions contracts/escrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,11 @@ impl EscrowContract {
MATCH_TTL_LEDGERS,
);

// Release game_id so it can be reused in a rematch
env.storage()
.persistent()
.remove(&DataKey::GameId(m.game_id.clone()));

// Remove from active match index
Self::remove_from_active(&env, match_id);

Expand Down Expand Up @@ -587,6 +592,11 @@ impl EscrowContract {
MATCH_TTL_LEDGERS,
);

// Release game_id so it can be reused in a rematch
env.storage()
.persistent()
.remove(&DataKey::GameId(m.game_id.clone()));

// Remove from active match index
Self::remove_from_active(&env, match_id);

Expand Down
Loading