Skip to content

Commit

Permalink
No longer restricts child catalog to match parent's to consider equip…
Browse files Browse the repository at this point in the history
…pable.
  • Loading branch information
steven2308 committed Sep 9, 2023
1 parent d740f26 commit c017ba7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion contracts/RMRK/utils/RMRKEquipRenderUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,6 @@ contract RMRKEquipRenderUtils is
.getAssetAndEquippableData(childId, childAssets[i]);
for (uint256 j; j < parentSlotPartIds.length; ) {
if (
catalogAddress == parentAssetCatalog &&
childContract.canTokenBeEquippedWithAssetIntoSlot(
parentAddress,
childId,
Expand Down
13 changes: 12 additions & 1 deletion test/renderUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ describe('Advanced Equip Render Utils', async function () {
]);
});

it('can get equippable slots from parent asset and excludes if catalog does not match', async function () {
it('can get equippable slots from parent asset even if catalog does not match', async function () {
await setUpCatalog(catalog, gem.address);
await setUpKanariaAsset(kanaria, kanariaId, catalog.address);
await setUpGemAssets(gem, gemId1, gemId2, gemId3, kanaria.address, catalog.address);
Expand Down Expand Up @@ -713,6 +713,17 @@ describe('Advanced Equip Render Utils', async function () {
'ipfs://gems/typeB/left.svg',
'ipfs://kanaria/full.svg',
],
[
bn(slotIdGemLeft),
newResourceId,
bn(assetForKanariaFull),
bn(4),
catalog.address, // This is the catalog address of the parent, not the child
false,
'ipfs://metadataSlotGemLeft',
'ipfs://assetFromOtherCatalog.jpg',
'ipfs://kanaria/full.svg',
],
],
]);
});
Expand Down

0 comments on commit c017ba7

Please sign in to comment.