Take a look at https://github.com/code-423n4/2024-08-wildcat/blob/fe746cc0fbedc4447a981a50e6ba4c95f98b9fe1/src/market/WildcatMarketToken.sol#L49-L66
This function is used for the popular implementation of transferfrom(), issue however is that the method always uses allowance even if spender = from. 
QA, because currently if sender==from when calling transferFrom function, it will also deduct allowances, which should not be deducted.
Only use allowance when spender != from.
