I'm having trouble to understand where the allowance is checked in the "transferFrom" function - IMHO the allowed amount is deducted but never checked weather it is sufficient to allow the transactions - what am I getting wrong here?
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
Transfer(from, to, tokens);
return true;
}
require
that checks for availability of amount inallowed
.