diff --git a/contracts/misc/HelperContract.sol b/contracts/misc/HelperContract.sol index 1c3dea9d..6e3b4105 100644 --- a/contracts/misc/HelperContract.sol +++ b/contracts/misc/HelperContract.sol @@ -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); } } diff --git a/test/helper_contract.spec.ts b/test/helper_contract.spec.ts index 0bfd055d..66dcacc1 100644 --- a/test/helper_contract.spec.ts +++ b/test/helper_contract.spec.ts @@ -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")) });