Resolves a bank from an inbound wire-email address's local part, reading
b2b.bank directly with no cache — the SES wire-email lambda runs per email
at low volume, so a single indexed lookup is cheaper than cache machinery.
The effective local part is coalesce(wire_email_local_part, external_id)
(a bank inherits its slug as the local part unless an override is set),
matched case-insensitively. The functional unique index on that expression
guarantees a 0-or-1 result, so no two banks can claim the same address.
Lives in wire-email-services (not bank-services) so the lambda stays lean:
it needs this one bank read, not the cached BankAdminService surface.
Resolves a bank from an inbound wire-email address's local part, reading
b2b.bankdirectly with no cache — the SES wire-email lambda runs per email at low volume, so a single indexed lookup is cheaper than cache machinery.The effective local part is
coalesce(wire_email_local_part, external_id)(a bank inherits its slug as the local part unless an override is set), matched case-insensitively. The functional unique index on that expression guarantees a 0-or-1 result, so no two banks can claim the same address.Lives in wire-email-services (not bank-services) so the lambda stays lean: it needs this one bank read, not the cached BankAdminService surface.