Skip to content

Commit

Permalink
Merge pull request #339 from moonstream-to/inventory-override
Browse files Browse the repository at this point in the history
Made `equip` and `unequip` public overrides on `InventoryFacet`
  • Loading branch information
zomglings committed Oct 4, 2023
2 parents 85a8edd + 5819527 commit d595dd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/web3cli/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
0.0.7
6 changes: 3 additions & 3 deletions contracts/inventory/InventoryFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ contract InventoryFacet is
address itemAddress,
uint256 itemTokenId,
uint256 amount
) external diamondNonReentrant {
) public override diamondNonReentrant {
require(
itemType == LibInventory.ERC20_ITEM_TYPE ||
itemType == LibInventory.ERC721_ITEM_TYPE ||
Expand Down Expand Up @@ -408,7 +408,7 @@ contract InventoryFacet is
// TODO(zomglings): The current implementation makes it so that players cannot increase the
// number of tokens of a given type that are equipped into a persistent slot. I would consider
// this a bug. For more details, see comment at bottom of the following test:
// web3cli.test_inventory.TestPlayerFlow.test_player_cannot_unequip_erc20_tokens_from_persistent_slot_but_can_increase_amount
// web3cli.test_inventory.TestPlayerFlow.test_player_cannot_unequip_erc20_tokens_from_persistent_slot
if (
istore
.EquippedItems[istore.ContractERC721Address][subjectTokenId][slot]
Expand Down Expand Up @@ -491,7 +491,7 @@ contract InventoryFacet is
uint256 slot,
bool unequipAll,
uint256 amount
) external diamondNonReentrant {
) public override diamondNonReentrant {
LibInventory.InventoryStorage storage istore = LibInventory
.inventoryStorage();

Expand Down

0 comments on commit d595dd7

Please sign in to comment.