From c961a2a181f0ab2b7bbeba9ae900448d8d6c88bd Mon Sep 17 00:00:00 2001 From: Daniel Beal Date: Thu, 13 Jul 2023 13:26:04 -0700 Subject: [PATCH] fix msg sender should be target on migrate func --- contracts/BaseSynthetix.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/BaseSynthetix.sol b/contracts/BaseSynthetix.sol index 08d6917516..f681782211 100644 --- a/contracts/BaseSynthetix.sol +++ b/contracts/BaseSynthetix.sol @@ -463,14 +463,14 @@ contract BaseSynthetix is IERC20, ExternStateToken, MixinResolver, ISynthetix { // get their liquid SNX balance and transfer it to the migrator contract totalLiquidBalance = tokenState.balanceOf(account); if (totalLiquidBalance > 0) { - bool succeeded = _transferByProxy(account, debtMigratorOnEthereum, totalLiquidBalance); + bool succeeded = _transferByProxy(account, msg.sender, totalLiquidBalance); require(succeeded, "snx transfer failed"); } // get their escrowed SNX balance and revoke it all totalEscrowRevoked = rewardEscrowV2().totalEscrowedAccountBalance(account); if (totalEscrowRevoked > 0) { - rewardEscrowV2().revokeFrom(account, debtMigratorOnEthereum, totalEscrowRevoked, 0); + rewardEscrowV2().revokeFrom(account, msg.sender, totalEscrowRevoked, 0); } }