Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffywu committed Aug 9, 2024
1 parent 121fe6a commit a78f2cc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions contracts/vaults/common/VaultRewarderLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,18 @@ contract VaultRewarderLib is IVaultRewarder {
// prevent normal vault operations from working. Failures may include a
// lack of balances or some sort of blacklist that prevents an account
// from receiving tokens.
try IEIP20NonStandard(rewardToken).transfer(account, rewardToClaim) {
bool success = TokenUtils.checkReturnCode();
if (success) {
emit VaultRewardTransfer(rewardToken, account, rewardToClaim);
} else {
if (rewardToken.code.length > 0) {
try IEIP20NonStandard(rewardToken).transfer(account, rewardToClaim) {
bool success = TokenUtils.checkReturnCode();
if (success) {
emit VaultRewardTransfer(rewardToken, account, rewardToClaim);
} else {
emit VaultRewardTransfer(rewardToken, account, 0);
}
// Emits zero tokens transferred if the transfer fails.
} catch {
emit VaultRewardTransfer(rewardToken, account, 0);
}
// Emits zero tokens transferred if the transfer fails.
} catch {
emit VaultRewardTransfer(rewardToken, account, 0);
}
}
}
Expand Down

0 comments on commit a78f2cc

Please sign in to comment.