Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/aleph_client/commands/instance/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
Loading