Skip to content

Commit

Permalink
remove sending escrowed tokens in removeSpigot; breaks Line assumptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kibagateaux committed Aug 18, 2022
1 parent aaf800d commit 2cc3259
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions contracts/modules/spigot/Spigot.sol
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,7 @@ contract Spigot is ISpigot, ReentrancyGuard {
returns (bool)
{
if(msg.sender != owner) { revert CallerAccessDenied(); }

address token = settings[revenueContract].token;
uint256 claimable = escrowed[token];
if(claimable > 0) {
require(LineLib.sendOutTokenOrETH(token, owner, claimable));
emit ClaimEscrow(token, claimable, owner);
}


(bool success,) = revenueContract.call(
abi.encodeWithSelector(
settings[revenueContract].transferOwnerFunction,
Expand All @@ -267,7 +260,7 @@ contract Spigot is ISpigot, ReentrancyGuard {
require(success);

delete settings[revenueContract];
emit RemoveSpigot(revenueContract, token);
emit RemoveSpigot(revenueContract, settings[revenueContract].token);

return true;
}
Expand Down

0 comments on commit 2cc3259

Please sign in to comment.