"""Feature flag constants module.""" from abacus_common_logic.utils.features import is_feature_enabled from flask import g ABACUS_TAP_BYPASS_PDP_CHECK = 'abacus_tap_bypass_pdp_check' TAP_AWAL_PAYMENT_ELIGIBILITY_AUTO_APPROVE = 'tap_awal_payment_eligibility_auto_approve' ACCOUNT_PAYEE_FLOW = 'AccountPayee' def is_abacus_tap_bypass_pdp_check_enabled(): """Check if ABACUS_TAP_BYPASS_PDP_CHECK is enabled.""" return is_feature_enabled(ABACUS_TAP_BYPASS_PDP_CHECK, g.request_context) def is_account_payee_flow(): """Check if the current request is the AccountPayee flow (not a generic payee).""" return getattr(g, 'payee_flow', ACCOUNT_PAYEE_FLOW) == ACCOUNT_PAYEE_FLOW def is_tap_awal_payment_eligibility_auto_approve_enabled(): """Check if TAP_AWAL_PAYMENT_ELIGIBILITY_AUTO_APPROVE is enabled.""" return is_feature_enabled( TAP_AWAL_PAYMENT_ELIGIBILITY_AUTO_APPROVE, g.request_context )