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(