Skip to content

Commit

Permalink
send royalties only if gt than zero. (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr13tech committed Jul 4, 2022
1 parent 924fa88 commit 70566a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/spaceibles/SpaceibleOffer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ contract SpaceibleOffer is GeneratorID {

uint256 sellerFeeAmount = amountPrice - royaltiesFeeAmount - operatorFeeAmount;

money.transferFrom(msg.sender, creator, royaltiesFeeAmount);
// do not send 0 amount ERC20 transfer
if (royaltiesFeeAmount > 0) {
money.transferFrom(msg.sender, creator, royaltiesFeeAmount);
}
money.transferFrom(msg.sender, operator, operatorFeeAmount);
money.transferFrom(msg.sender, offer.seller, sellerFeeAmount);

Expand Down

0 comments on commit 70566a3

Please sign in to comment.