Skip to content

Commit

Permalink
fix: incompatibility with multi-signature wallets due to .transfer usage
Browse files Browse the repository at this point in the history
  • Loading branch information
easonchan17 committed Feb 29, 2024
1 parent 36186b7 commit 54ee538
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/lockers/LockersLogic.sol
Expand Up @@ -414,10 +414,10 @@ contract LockersLogic is LockersStorageStructure, ILockers,
);

// Transfers TNT to user
payable(_recipient).transfer(equivalentNativeToken*_amount/(_amount + _rewardAmount));
Address.sendValue(payable(_recipient), equivalentNativeToken*_amount/(_amount + _rewardAmount));
// Transfers TNT to slasher
uint rewardAmountInNativeToken = equivalentNativeToken - (equivalentNativeToken*_amount/(_amount + _rewardAmount));
payable(_rewardRecipient).transfer(rewardAmountInNativeToken);
Address.sendValue(payable(_rewardRecipient), rewardAmountInNativeToken);

emit LockerSlashed(
_lockerTargetAddress,
Expand Down Expand Up @@ -463,7 +463,7 @@ contract LockersLogic is LockersStorageStructure, ILockers,
_amount
);

payable(_rewardRecipient).transfer(rewardInNativeToken);
Address.sendValue(payable(_rewardRecipient), rewardInNativeToken);

emit LockerSlashed(
_lockerTargetAddress,
Expand Down

0 comments on commit 54ee538

Please sign in to comment.