PatrickAlphaC / hardhat-nft-marketplace-fcc

114 stars 97 forks source link

How i can write test for this --> revert NftMarketplace__TransferFailed(); #32

Closed Nikhil8400 closed 1 year ago

Nikhil8400 commented 1 year ago

function withdrawProceeds() external { uint256 proceeds = s_proceeds[msg.sender]; if(proceeds<=0){ revert NftMarketplace__NoProceeds(); } s_proceeds[msg.sender] = 0; (bool success,) = payable(msg.sender).call{value: proceeds}(""); if(!success){ revert NftMarketplace__TransferFailed(); } }

PatrickAlphaC commented 1 year ago

Thanks for this issue.

Can you:

  1. Make this a discusson on the full repo? https://github.com/smartcontractkit/full-blockchain-solidity-course-js/
  2. Follow this section for formatting questions? https://www.youtube.com/watch?t=19846&v=gyMwXuJrbJQ&feature=youtu.be