Truncates a value to the number of decimals corresponding to the currency

def truncate_to(value: Decimal, currency: str) -> Decimal:
    """Truncates a value to the number of decimals corresponding to the currency"""
    decimal_places = DECIMALS.get(currency.upper(), 2)
    return truncate(value, decimal_places)