Ah ok I see what youâre saying! So would these changes be correct?
-
Adding this as the third line of the withdraw() functionâŠ
balance[msg.sender] - amount;
-
Adding the return statement below this line as soâŠ
return balance[msg.sender];
So the final product would end up coming out toâŠ
function withdraw(uint amount) public onlyOwner returns (uint) {
require(balance[msg.sender] >= amount, "Insufficient Funds: Please enter withdraw amount less than your current balance");
msg.sender.transfer(amount);
balance[msg.sender] - amount;
return balance[msg.sender];
}
Let me know if this are the appropriate corrections. Thanks!