From 0c37b5a07ce60c06225faf0d7b5decd34d8ad4e9 Mon Sep 17 00:00:00 2001 From: gcranju Date: Tue, 6 Feb 2024 12:07:42 +0545 Subject: [PATCH] fix: optimized in claimProtocolFee --- contracts/evm/contracts/xcall/CallService.sol | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/evm/contracts/xcall/CallService.sol b/contracts/evm/contracts/xcall/CallService.sol index 5e6edf2c..7319f9e5 100644 --- a/contracts/evm/contracts/xcall/CallService.sol +++ b/contracts/evm/contracts/xcall/CallService.sol @@ -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); }