ICRC2 handling transfer_from() and expires_at

Hi how should the ledger handle the icrc2_transfer_from method if the spender’s expires_at was set and it’s before the current time (ie expired)?

i ask because on

the expires_at was only handled during icrc2_approve method with the possibility of #Expired : { ledger_time : nat64 } error.

while icrc2_transfer_from does not have that error.

should I handle it this way?

When the approval expires, the ledger treats it as if it never existed (the DFINITY implementation actively prunes expired approvals from memory, for example). So the icrc2_transfer_from method should return the InsufficientAllowance error when the approval expires.

Also note that the GenericError variant is reserved for future refinements of the standard, not for the implementors to return custom errors.