diff --git a/contracts/erc4626/Vault.sol b/contracts/erc4626/Vault.sol index 046dcd8..61452ff 100644 --- a/contracts/erc4626/Vault.sol +++ b/contracts/erc4626/Vault.sol @@ -433,6 +433,7 @@ contract HederaVault is IERC4626, FeeConfiguration, Ownable, ReentrancyGuard { */ function claimAllReward(uint256 _startPosition) public payable returns (uint256, uint256) { uint256 rewardTokensSize = rewardTokens.length; + address _token = feeConfig.token; for (uint256 i = _startPosition; i < rewardTokensSize && i < _startPosition + 10; i++) { uint256 reward; @@ -441,7 +442,7 @@ contract HederaVault is IERC4626, FeeConfiguration, Ownable, ReentrancyGuard { .mulDivDown(1, userContribution[msg.sender].sharesAmount); userContribution[msg.sender].lastClaimedAmountT[token] = tokensRewardInfo[token].amount; SafeHTS.safeTransferToken(token, address(this), msg.sender, int64(uint64(reward))); - _deductFee(reward); + if (_token != address(0)) _deductFee(reward); } return (_startPosition, rewardTokensSize); } diff --git a/data/deployments/chain-296.json b/data/deployments/chain-296.json index 24d76da..b1a71cb 100644 --- a/data/deployments/chain-296.json +++ b/data/deployments/chain-296.json @@ -23,7 +23,7 @@ }, "vault": { "HederaVault": "0xe95E635753a8A233cB736c5CB0dF181Bb865a90b", - "VaultFactory": "0x4097b8cDe36d20E442B59F78f468eBcA16B9482E", + "VaultFactory": "0x376AFd1bc4df43c7Ab7B4Ead41da2067093077D9", "StakingToken": "0x0000000000000000000000000000000000423251", "Share": "0x0000000000000000000000000000000000423255", "RewardToken": "0x0000000000000000000000000000000000423252"