BitGuildMarketPlace.sol
This function is supposed to allow ETH withdrawals from the contract:
// @dev Admin function: withdraw ETH balance
function withdrawETH() public onlyOwner payable {
msg.sender.transfer(msg.value);
}
However, it is marked as a payable and transfers msg.value back to the sender. In other words, this function is useless as it sends back what it receives. Probably it was supposed to transfer the ETH balance of the contract to the owner.
Solution:
// @dev Admin function: withdraw ETH balance
function withdrawETH() public onlyOwner {
msg.sender.transfer(address(this).balance);
}
BitGuildMarketPlace.sol
This function is supposed to allow ETH withdrawals from the contract:
However, it is marked as a payable and transfers msg.value back to the sender. In other words, this function is useless as it sends back what it receives. Probably it was supposed to transfer the ETH balance of the contract to the owner.
Solution: