Skip to content

Commit

Permalink
chore: add to parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoujia6139 committed Aug 31, 2023
1 parent 804435c commit df12c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/misc/HelperContract.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ contract HelperContract is Initializable, OwnableUpgradeable {
IERC20(apeCoin).safeTransfer(msg.sender, amount);
}

function cApeMigration(uint256 amount) external {
function cApeMigration(uint256 amount, address to) external {
IERC20(cApeV1).safeTransferFrom(msg.sender, address(this), amount);
IAutoCompoundApe(cApeV1).withdraw(amount);
IAutoCompoundApe(cApe).deposit(msg.sender, amount);
IAutoCompoundApe(cApe).deposit(to, amount);
}
}
2 changes: 1 addition & 1 deletion test/helper_contract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe("Helper contract Test", () => {
await waitForTx(
await helperContract
.connect(user1.signer)
.cApeMigration(parseEther("10000"))
.cApeMigration(parseEther("10000"), user1.address)
);
expect(await cApe.balanceOf(user1.address)).to.be.eq(parseEther("10000"))
});
Expand Down

0 comments on commit df12c6e

Please sign in to comment.