Skip to content

Commit

Permalink
fix: fails after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
capedcrusader21 committed Sep 9, 2024
1 parent b4cc71a commit 2a20690
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/marketplace/contracts/ExchangeCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ abstract contract ExchangeCore is Initializable, ITransferManager {
LibOrder.FillResult memory newFill = _parseOrdersSetFillEmitMatch(sender, orderLeft, orderRight);

doTransfers(
ITransferManager.DealSide(LibAsset.Asset(makeMatch, newFill.leftValue, orderLeft.makeAsset.priceDistribution), orderLeft.maker),
ITransferManager.DealSide(LibAsset.Asset(takeMatch, newFill.rightValue, orderRight.makeAsset.priceDistribution), orderRight.maker),
ITransferManager.DealSide(LibAsset.Asset(makeMatch, newFill.leftValue), orderLeft.maker),
ITransferManager.DealSide(LibAsset.Asset(takeMatch, newFill.rightValue), orderRight.maker),
LibAsset.getFeeSide(makeMatch.assetClass, takeMatch.assetClass)
);
}
Expand Down
15 changes: 8 additions & 7 deletions packages/marketplace/contracts/TransferManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ abstract contract TransferManager is Initializable, ITransferManager {
);
}
if (remainder > 0) {
_transfer(LibAsset.Asset(paymentSide.asset.assetType, remainder), paymentSide.account, nftSide.recipient);
(, address nftSideRecipient) = _getRecipients(paymentSide, nftSide);
_transfer(LibAsset.Asset(paymentSide.asset.assetType, remainder), paymentSide.account, nftSideRecipient);
}
}

Expand All @@ -234,6 +235,7 @@ abstract contract TransferManager is Initializable, ITransferManager {
DealSide memory paymentSide,
DealSide memory nftSide
) internal returns (uint256) {
(, address nftSideRecipient) = _getRecipients(paymentSide, nftSide);
if (nftSide.asset.assetType.assetClass == LibAsset.AssetClass.BUNDLE) {
LibAsset.Bundle memory bundle = LibAsset.decodeBundle(nftSide.asset.assetType);

Expand All @@ -251,7 +253,7 @@ abstract contract TransferManager is Initializable, ITransferManager {
paymentSide,
bundle.priceDistribution.erc721Prices[i][j],
royalties,
nftSide.recipient
nftSideRecipient
);
}
}
Expand All @@ -270,7 +272,7 @@ abstract contract TransferManager is Initializable, ITransferManager {
paymentSide,
bundle.priceDistribution.erc1155Prices[i][j],
royalties,
nftSide.recipient
nftSideRecipient
);
}
}
Expand All @@ -293,15 +295,14 @@ abstract contract TransferManager is Initializable, ITransferManager {
paymentSide,
bundle.priceDistribution.quadPrices[i],
royalties,
nftSide.recipient
nftSideRecipient
);
}
}
} else {
(address token, uint256 tokenId) = LibAsset.decodeToken(nftSide.asset.assetType);
(, address nftSideRecipient) = _getRecipients(paymentSide, nftSide);
IRoyaltiesProvider.Part[] memory royalties = royaltiesRegistry.getRoyalties(token, tokenId);
remainder = _applyRoyalties(remainder, paymentSide, remainder, royalties, nftSide.recipient);
IRoyaltiesProvider.Part[] memory royalties = royaltiesRegistry.getRoyalties(token, tokenId);
remainder = _applyRoyalties(remainder, paymentSide, remainder, royalties, nftSideRecipient);
}
return remainder;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/marketplace/test/utils/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export const AssetERC20 = async (
baseValues.push(recipient);
}

console.log(baseParams);
console.log(baseValues);
// console.log(baseParams);
// console.log(baseValues);

return {
assetType: {
Expand Down

0 comments on commit 2a20690

Please sign in to comment.