Closed Nikhil8400 closed 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(); } }
Thanks for this issue.
Can you:
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(); } }