Skip to content

Commit 059d8b4

Browse files
authored
Merge pull request #709 from BANADDA/fix-stake-move-table-width
Fix table width visual bug in stake move command
2 parents 1062771 + 3beed72 commit 059d8b4

File tree

1 file changed

+24
-5
lines changed
  • bittensor_cli/src/commands/stake

1 file changed

+24
-5
lines changed

bittensor_cli/src/commands/stake/move.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,39 +108,58 @@ async def display_stake_movement_cross_subnets(
108108
)
109109

110110
table.add_column(
111-
"origin netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"]
111+
"origin netuid",
112+
justify="center",
113+
style=COLOR_PALETTE["GENERAL"]["SYMBOL"],
114+
max_width=14,
112115
)
113116
table.add_column(
114-
"origin hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"]
117+
"origin hotkey",
118+
justify="center",
119+
style=COLOR_PALETTE["GENERAL"]["HOTKEY"],
120+
max_width=15,
115121
)
116122
table.add_column(
117-
"dest netuid", justify="center", style=COLOR_PALETTE["GENERAL"]["SYMBOL"]
123+
"dest netuid",
124+
justify="center",
125+
style=COLOR_PALETTE["GENERAL"]["SYMBOL"],
126+
max_width=12,
118127
)
119128
table.add_column(
120-
"dest hotkey", justify="center", style=COLOR_PALETTE["GENERAL"]["HOTKEY"]
129+
"dest hotkey",
130+
justify="center",
131+
style=COLOR_PALETTE["GENERAL"]["HOTKEY"],
132+
max_width=15,
121133
)
122134
table.add_column(
123135
f"amount ({Balance.get_unit(origin_netuid)})",
124136
justify="center",
125137
style=COLOR_PALETTE["STAKE"]["TAO"],
138+
max_width=18,
126139
)
127140
table.add_column(
128141
f"rate ({Balance.get_unit(destination_netuid)}/{Balance.get_unit(origin_netuid)})",
129142
justify="center",
130143
style=COLOR_PALETTE["POOLS"]["RATE"],
144+
max_width=20,
131145
)
132146
table.add_column(
133147
f"received ({Balance.get_unit(destination_netuid)})",
134148
justify="center",
135149
style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"],
150+
max_width=18,
136151
)
137152
table.add_column(
138153
f"Fee ({Balance.get_unit(origin_netuid)})",
139154
justify="center",
140155
style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
156+
max_width=15,
141157
)
142158
table.add_column(
143-
"Extrinsic Fee (τ)", justify="center", style=COLOR_PALETTE.STAKE.TAO
159+
"Extrinsic Fee (τ)",
160+
justify="center",
161+
style=COLOR_PALETTE.STAKE.TAO,
162+
max_width=18,
144163
)
145164

146165
table.add_row(

0 commit comments

Comments
 (0)