Skip to content

Commit

Permalink
chore: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdt committed Apr 29, 2024
1 parent 112107f commit 55934c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/LightBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -397,19 +397,19 @@ contract LightBridge is PausableUpgradeable, MulticallUpgradeable {
onlyOwner()
onlyInitialized()
{
require(_amount != 0, "Amount is 0");
if (address(0) == _token) {
uint256 _balance = address(this).balance;
require(_balance >= _amount, "Too high");
(bool sent,) = owner.call{gas: 2300, value: _amount}("");
require(sent, "Failed to send Ether");
emit AssetBalanceWithdrawn(_token, owner, _amount);
} else {
// no supportedToken check in case of generally lost tokens
uint256 _balance = IERC20(_token).balanceOf(address(this));
require(_balance >= _amount, "Too high");
IERC20(_token).safeTransfer(owner, _amount);
emit AssetBalanceWithdrawn(_token, owner, _amount);
}
emit AssetBalanceWithdrawn(_token, owner, _amount);
}

/**
Expand Down

0 comments on commit 55934c9

Please sign in to comment.