"""Utilities for payment entities.""" from payee.constants.constants import AWAL_PAYMENT_ENTITY_PREFIX from payee.logic.graphql import get_payment_entity_name_by_account_id def is_awal_account(account_id: int) -> bool: """Check if account belongs to an AWAL payment entity.""" payment_entity_name = get_payment_entity_name_by_account_id(account_id) if not payment_entity_name: return False return payment_entity_name.startswith(AWAL_PAYMENT_ENTITY_PREFIX)