Skip to content

Commit 2a062aa

Browse files
authored
Merge branch 'staging' into feat/thewhaleking/add-neuron-certificates-query-map
2 parents 7712fa3 + b4b82a6 commit 2a062aa

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bittensor/utils/balance.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,13 @@ def __float__(self):
5353
return self.tao
5454

5555
def __str__(self):
56-
"""Returns the Balance object as a string in the format "symbolvalue", where the value is in tao."""
57-
return f"{self.unit}{float(self.tao):,.9f}"
56+
"""
57+
Returns the Balance object as a string in the format "symbolvalue", where the value is in tao.
58+
"""
59+
if self.unit == units[0]:
60+
return f"{self.unit}{float(self.tao):,.9f}"
61+
else:
62+
return f"\u200e{float(self.tao):,.9f}{self.unit}\u200e"
5863

5964
def __rich__(self):
6065
int_tao, fract_tao = format(float(self.tao), "f").split(".")

0 commit comments

Comments
 (0)