Skip to content

Commit

Permalink
fix: strings dont like len
Browse files Browse the repository at this point in the history
  • Loading branch information
rsproule committed Jan 3, 2024
1 parent c0d304e commit dfc83a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/src/libraries/Join.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ library JoinLib {
require(players[params.joiner] == 0, "already joined");
require(playersCount < settings.playerCount, "game is full");
require(msg.value >= settings.buyInMinimum, "insufficient buy in");
require(params.playerName.length > 0, "must provide name");
require(bytes(params.playerName).length > 0, "must provide name");
bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(params.joiner, params.playerName))));
require(settings.root == bytes32(0) || MerkleProof.verify(params.proof, settings.root, leaf), "invalid proof");
}
Expand Down

0 comments on commit dfc83a1

Please sign in to comment.