From f386ce49003db0711a9a8f1216115c6a0b60af83 Mon Sep 17 00:00:00 2001 From: Feiyang Tan <37208480+FeiyangTan@users.noreply.github.com> Date: Tue, 1 Jun 2021 15:48:07 +0800 Subject: [PATCH 1/2] Update REFLECT.sol unnecessary else if --- contracts/REFLECT.sol | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contracts/REFLECT.sol b/contracts/REFLECT.sol index 0a11769..ce72c30 100644 --- a/contracts/REFLECT.sol +++ b/contracts/REFLECT.sol @@ -158,8 +158,6 @@ contract REFLECT is Context, IERC20, Ownable { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); - } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { - _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { @@ -244,4 +242,4 @@ contract REFLECT is Context, IERC20, Ownable { if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } -} \ No newline at end of file +} From 732cbe6eede57107a16c1e8029e69244f207b98e Mon Sep 17 00:00:00 2001 From: Feiyang Tan <37208480+FeiyangTan@users.noreply.github.com> Date: Wed, 2 Jun 2021 19:56:14 +0800 Subject: [PATCH 2/2] Update REFLECT.sol meaningless for setting _tOwned[account] to 0 while account is not in the _excluded list, since the value of _tOwned[account] is used only at the situation " _isExcluded[account] = true". --- contracts/REFLECT.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/REFLECT.sol b/contracts/REFLECT.sol index ce72c30..3750b23 100644 --- a/contracts/REFLECT.sol +++ b/contracts/REFLECT.sol @@ -134,7 +134,7 @@ contract REFLECT is Context, IERC20, Ownable { for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; - _tOwned[account] = 0; + //_tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break;