Skip to content

Commit c2983c3

Browse files
authored
Resolved lint warnings and transfer in tutorial-24
1 parent 3c070c5 commit c2983c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tutorial-24/MultiSigWallet.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ contract MultiSigWallet {
1919
event WithdrawFunds(address to, uint amount);
2020
event TransferFunds(address from, address to, uint amount);
2121

22-
function MultiSigWallet()
22+
constructor()
2323
public {
2424
_owner = msg.sender;
2525
}
@@ -39,23 +39,23 @@ contract MultiSigWallet {
3939
function ()
4040
public
4141
payable {
42-
DepositFunds(msg.sender, msg.value);
42+
emit DepositFunds(msg.sender, msg.value);
4343
}
4444

4545
function withdraw(uint amount)
4646
validOwner
4747
public {
4848
require(address(this).balance >= amount);
4949
msg.sender.transfer(amount);
50-
WithdrawFunds(msg.sender, amount);
50+
emit WithdrawFunds(msg.sender, amount);
5151
}
5252

5353
function transferTo(address to, uint amount)
5454
validOwner
5555
public {
5656
require(address(this).balance >= amount);
57-
msg.sender.transfer(amount);
58-
TransferFunds(msg.sender, to, amount);
57+
to.transfer(amount);
58+
emit TransferFunds(msg.sender, to, amount);
5959
}
6060

61-
}
61+
}

0 commit comments

Comments
 (0)