Skip to content

Commit

Permalink
fix msg sender should be target on migrate func
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeal-eth committed Jul 13, 2023
1 parent a60a474 commit c961a2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/BaseSynthetix.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit c961a2a

Please sign in to comment.