Skip to content

Commit

Permalink
Rename param to match the interface (#3917)
Browse files Browse the repository at this point in the history
  • Loading branch information
bxmmm1 authored Jan 3, 2023
1 parent 3a3c87b commit 2fc24fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/token/common/ERC2981.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ abstract contract ERC2981 is IERC2981, ERC165 {
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];

if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}

uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();
uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();

return (royalty.receiver, royaltyAmount);
}
Expand Down

0 comments on commit 2fc24fc

Please sign in to comment.