protocolmon / on-chain-battles

Smart contracts + CLI for fully on-chain monster battles
https://polychainmonsters.com
Apache License 2.0
3 stars 0 forks source link

Bugfix/withdraw check #12

Closed mauser001 closed 7 months ago

mauser001 commented 7 months ago

There is only one change from MatchMakerV3 to V4

-> ensure that the match is not already finished when you withdrawFromMatch. Otherwise it would count as an escape.

The change can be found in line 193 matches[matchId].phase < Phase.GameOver

onchainguy-btc commented 7 months ago

Very good finding, will upgrade contract asap.