From 93089b80b8367834221b178e2f4d04f414b685d0 Mon Sep 17 00:00:00 2001 From: "Andres D. Molins" Date: Thu, 2 Oct 2025 13:50:46 +0200 Subject: [PATCH] Fix: Put correct cost label for credit payment method. --- src/aleph_client/commands/instance/display.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/aleph_client/commands/instance/display.py b/src/aleph_client/commands/instance/display.py index 3cf609f2..31c58d50 100644 --- a/src/aleph_client/commands/instance/display.py +++ b/src/aleph_client/commands/instance/display.py @@ -203,6 +203,7 @@ def __init__( # Instance properties self.is_hold = message.content.payment and message.content.payment.type == PaymentType.hold.value + self.is_credit = message.content.payment and message.content.payment.type == PaymentType.credit.value self.firmware = safe_getattr(message.content.environment, "trusted_execution.firmware") self.is_confidential = self.firmware and len(self.firmware) == 64 self.has_gpu = True if safe_getattr(message.content.requirements, "gpu") else False @@ -293,7 +294,8 @@ async def _prepare_instance_column(self): pmonth = f"{displayable_amount(2628000*required_tokens, decimals=3)}/month" aleph_price = Text.assemble(psec, " | ", phour, " | ", pday, " | ", pmonth, style="magenta3") - cost = Text.assemble("\n$ALEPH: ", aleph_price) + cost_str = "\n$ALEPH: " if not self.is_credit else "\nCredits: " + cost = Text.assemble(cost_str, aleph_price) # Assemble the complete instance column result = Text.assemble(