- Need to double check "balanceAfter - balanceBefore == _amount" to make sure token transfers successfully and correctly.
return balanceAfter - balanceBefore;
It is suggested to add the following codes before this line of codes to make sure token transfers successfully and correctly.
require(balanceAfter - balanceBefore != _amount);