Skip to content

Commit

Permalink
pseudo-fix 234 (guardrails added)
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Jun 25, 2022
1 parent 928241d commit be9671c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ contract SponsorVault is ISponsorVault, Ownable {
uint256 num;
uint256 den;

if (_to.balance > relayerFeeCap || Address.isContract(_to)) {
// Already has fees, and the address is a contract
return;
}

if (address(gasTokenOracle) != address(0)) {
(num, den) = gasTokenOracle.getRate(_originDomain);

Expand All @@ -259,6 +264,7 @@ contract SponsorVault is ISponsorVault, Ownable {

Address.sendValue(_to, sponsoredFee);
}

emit ReimburseRelayerFees(sponsoredFee, _to);
}

Expand Down

0 comments on commit be9671c

Please sign in to comment.