Some tokens (e.g. LEND
) revert when transfering a zero value amount.
function transferFrom(address src, address dst, uint wad) override public returns (bool) {
require(wad != 0, "zero-value-transfer");
return super.transferFrom(src, dst, wad);
}
You need to add the condition.
if(amount > 0) transfer()
https://github.com/d-xo/weird-erc20#revert-on-zero-value-transfers