Skip to content

Commit

Permalink
fix: optimized in claimProtocolFee (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcranju authored Feb 12, 2024
1 parent eaa0e8f commit ab93b54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions contracts/evm/contracts/xcall/CallService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ contract CallService is IBSH, ICallService, IFeeManage, Initializable {
}

function claimProtocolFee() internal {
uint256 fee = this.getProtocolFee();
uint256 balance = address(this).balance;
require(balance >= fee, "InsufficientBalance");
require(balance >= protocolFee, "InsufficientBalance");
feeHandler.transfer(balance);
}

Expand Down

0 comments on commit ab93b54

Please sign in to comment.