TZIP-7: Should getAllowance return 0 for non-existing accounts?
Two edge-cases are unspecified in TZIP-7 regarding getAllowance(from, to)
:
- what should happen when the address
from
is not registered? Note thatgetBalance(addr)
returns0
ifaddr
is not registered, it makes sense to me to be coherent. - what should happen if
from
is registered, but has no allowance forto
? Here it seems obvious that the result should be0
, but it bares making explicit.
It would also make sense to see how existing FA1.2 implementations handle these cases. Probably, they either throw and error or return 0.