From 6af1e0923f5fc7fa2db0d11c1cdaaefb2cf3a7dc Mon Sep 17 00:00:00 2001 From: andyk Date: Tue, 15 Sep 2020 17:49:53 +0300 Subject: [PATCH] fix _incentivesController call in _transfer --- contracts/tokenization/ERC20.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/tokenization/ERC20.sol b/contracts/tokenization/ERC20.sol index 24257c3e..d7d33ab9 100644 --- a/contracts/tokenization/ERC20.sol +++ b/contracts/tokenization/ERC20.sol @@ -180,7 +180,9 @@ contract ERC20 is Context, IERC20, IERC20Detailed { if (address(_incentivesController) != address(0)) { uint256 totalSupply = _totalSupply; _incentivesController.handleAction(sender, totalSupply, oldSenderBalance); - _incentivesController.handleAction(recipient, totalSupply, oldRecipientBalance); + if (sender != recipient) { + _incentivesController.handleAction(recipient, totalSupply, oldRecipientBalance); + } } emit Transfer(sender, recipient, amount); }