Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/contracts/contracts/TokenLock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ contract TokenLock is OwnableUpgradeable, IERC20 {
revert TransferFailed();
}

emit Transfer(msg.sender, address(this), amount);
emit Transfer(address(this), msg.sender, amount);
}

/// @dev Withdraw tokens after the end of the locking period or during the deposit period
Expand All @@ -81,7 +81,7 @@ contract TokenLock is OwnableUpgradeable, IERC20 {
revert TransferFailed();
}

emit Transfer(address(this), msg.sender, amount);
emit Transfer(msg.sender, address(this), amount);
}

/// @dev Returns the number of decimals of the locked token
Expand Down
6 changes: 3 additions & 3 deletions packages/contracts/test/TokenLock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe("TokenLock", () => {

await expect(tokenLock.connect(user).deposit(ONE))
.to.emit(tokenLock, "Transfer")
.withArgs(user.address, tokenLock.address, ONE)
.withArgs(tokenLock.address, user.address, ONE)
})
})

Expand Down Expand Up @@ -342,7 +342,7 @@ describe("TokenLock", () => {

await expect(tokenLock.connect(user).withdraw(ONE))
.to.emit(tokenLock, "Transfer")
.withArgs(tokenLock.address, user.address, ONE)
.withArgs(user.address, tokenLock.address, ONE)
})

it("allows withdrawals during the deposit period", async () => {
Expand All @@ -351,7 +351,7 @@ describe("TokenLock", () => {

await expect(tokenLock.connect(user).withdraw(ONE))
.to.emit(tokenLock, "Transfer")
.withArgs(tokenLock.address, user.address, ONE)
.withArgs(user.address, tokenLock.address, ONE)
})
})

Expand Down