We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b980a5c commit f5df11fCopy full SHA for f5df11f
contracts/TokenLock.sol
@@ -51,11 +51,12 @@ contract TokenLock is OwnableUpgradeable, IERC20 {
51
revert DepositPeriodOver();
52
}
53
54
+ balanceOf[msg.sender] += amount;
55
+ totalSupply += amount;
56
+
57
if (!token.transferFrom(msg.sender, address(this), amount)) {
58
revert TransferFailed();
59
- balanceOf[msg.sender] += amount;
- totalSupply += amount;
60
61
emit Transfer(msg.sender, address(this), amount);
62
@@ -75,6 +76,7 @@ contract TokenLock is OwnableUpgradeable, IERC20 {
75
76
77
balanceOf[msg.sender] -= amount;
78
totalSupply -= amount;
79
80
if (!token.transfer(msg.sender, amount)) {
81
82
0 commit comments