Skip to content

Commit

Permalink
issue iiitl#3 made seller payable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansh-Agrawal1817 committed Mar 16, 2024
1 parent 8a59ace commit 337cd1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion contracts/Contract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ contract Contract {
require(msg.value == purchasePrice[_nftID], "Incorrect purchase price.");
require(isListed[_nftID] == true, "NFT is not listed for sale.");

(bool success, ) = seller.call{value: msg.value}("");
//make seller address payable
address payable sellerAddress = payable(seller);
(bool success, ) = sellerAddress.call{value: msg.value}("");
require(success, "Transfer failed.");

isListed[_nftID] = false;
Expand Down

0 comments on commit 337cd1c

Please sign in to comment.