|
25 | 25 | WalletOptions as WO,
|
26 | 26 | WalletValidationTypes as WV,
|
27 | 27 | Constants,
|
28 |
| - COLOR_PALETTE, |
| 28 | + COLORS, |
29 | 29 | HYPERPARAMS,
|
30 | 30 | )
|
31 | 31 | from bittensor_cli.version import __version__, __version_as_int__
|
@@ -341,8 +341,8 @@ def get_optional_netuid(netuid: Optional[int], all_netuids: bool) -> Optional[in
|
341 | 341 | return None
|
342 | 342 | elif netuid is None and all_netuids is False:
|
343 | 343 | answer = Prompt.ask(
|
344 |
| - f"Enter the [{COLOR_PALETTE['GENERAL']['SUBHEADING_MAIN']}]netuid" |
345 |
| - f"[/{COLOR_PALETTE['GENERAL']['SUBHEADING_MAIN']}] to use. Leave blank for all netuids", |
| 344 | + f"Enter the [{COLORS.G.SUBHEAD_MAIN}]netuid" |
| 345 | + f"[/{COLORS.G.SUBHEAD_MAIN}] to use. Leave blank for all netuids", |
346 | 346 | default=None,
|
347 | 347 | show_default=False,
|
348 | 348 | )
|
@@ -950,7 +950,8 @@ def initialize_chain(
|
950 | 950 | elif self.config["network"]:
|
951 | 951 | self.subtensor = SubtensorInterface(self.config["network"])
|
952 | 952 | console.print(
|
953 |
| - f"Using the specified network [{COLOR_PALETTE['GENERAL']['LINKS']}]{self.config['network']}[/{COLOR_PALETTE['GENERAL']['LINKS']}] from config" |
| 953 | + f"Using the specified network [{COLORS.G.LINKS}]{self.config['network']}" |
| 954 | + f"[/{COLORS.G.LINKS}] from config" |
954 | 955 | )
|
955 | 956 | else:
|
956 | 957 | self.subtensor = SubtensorInterface(defaults.subtensor.network)
|
@@ -1523,7 +1524,7 @@ def wallet_ask(
|
1523 | 1524 | else:
|
1524 | 1525 | wallet_name = Prompt.ask(
|
1525 | 1526 | "Enter the [blue]wallet name[/blue]"
|
1526 |
| - + f" [{COLOR_PALETTE['GENERAL']['HINT']} italic](Hint: You can set this with `btcli config set --wallet-name`)", |
| 1527 | + + f" [{COLORS.G.HINT} italic](Hint: You can set this with `btcli config set --wallet-name`)", |
1527 | 1528 | default=defaults.wallet.name,
|
1528 | 1529 | )
|
1529 | 1530 |
|
@@ -2049,7 +2050,7 @@ def wallet_regen_coldkey(
|
2049 | 2050 |
|
2050 | 2051 | if not wallet_name:
|
2051 | 2052 | wallet_name = Prompt.ask(
|
2052 |
| - f"Enter the name of the [{COLOR_PALETTE['GENERAL']['COLDKEY']}]new wallet (coldkey)", |
| 2053 | + f"Enter the name of the [{COLORS.G.CK}]new wallet (coldkey)", |
2053 | 2054 | default=defaults.wallet.name,
|
2054 | 2055 | )
|
2055 | 2056 |
|
@@ -2106,7 +2107,7 @@ def wallet_regen_coldkey_pub(
|
2106 | 2107 |
|
2107 | 2108 | if not wallet_name:
|
2108 | 2109 | wallet_name = Prompt.ask(
|
2109 |
| - f"Enter the name of the [{COLOR_PALETTE['GENERAL']['COLDKEY']}]new wallet (coldkey)", |
| 2110 | + f"Enter the name of the [{COLORS.G.CK}]new wallet (coldkey)", |
2110 | 2111 | default=defaults.wallet.name,
|
2111 | 2112 | )
|
2112 | 2113 | wallet = Wallet(wallet_name, wallet_hotkey, wallet_path)
|
@@ -2223,13 +2224,13 @@ def wallet_new_hotkey(
|
2223 | 2224 |
|
2224 | 2225 | if not wallet_name:
|
2225 | 2226 | wallet_name = Prompt.ask(
|
2226 |
| - f"Enter the [{COLOR_PALETTE['GENERAL']['COLDKEY']}]wallet name", |
| 2227 | + f"Enter the [{COLORS.G.CK}]wallet name", |
2227 | 2228 | default=defaults.wallet.name,
|
2228 | 2229 | )
|
2229 | 2230 |
|
2230 | 2231 | if not wallet_hotkey:
|
2231 | 2232 | wallet_hotkey = Prompt.ask(
|
2232 |
| - f"Enter the name of the [{COLOR_PALETTE['GENERAL']['HOTKEY']}]new hotkey", |
| 2233 | + f"Enter the name of the [{COLORS.G.HK}]new hotkey", |
2233 | 2234 | default=defaults.wallet.hotkey,
|
2234 | 2235 | )
|
2235 | 2236 |
|
@@ -2285,7 +2286,7 @@ def wallet_new_coldkey(
|
2285 | 2286 |
|
2286 | 2287 | if not wallet_name:
|
2287 | 2288 | wallet_name = Prompt.ask(
|
2288 |
| - f"Enter the name of the [{COLOR_PALETTE['GENERAL']['COLDKEY']}]new wallet (coldkey)", |
| 2289 | + f"Enter the name of the [{COLORS.G.CK}]new wallet (coldkey)", |
2289 | 2290 | default=defaults.wallet.name,
|
2290 | 2291 | )
|
2291 | 2292 |
|
@@ -2359,12 +2360,12 @@ def wallet_create_wallet(
|
2359 | 2360 |
|
2360 | 2361 | if not wallet_name:
|
2361 | 2362 | wallet_name = Prompt.ask(
|
2362 |
| - f"Enter the name of the [{COLOR_PALETTE['GENERAL']['COLDKEY']}]new wallet (coldkey)", |
| 2363 | + f"Enter the name of the [{COLORS.G.CK}]new wallet (coldkey)", |
2363 | 2364 | default=defaults.wallet.name,
|
2364 | 2365 | )
|
2365 | 2366 | if not wallet_hotkey:
|
2366 | 2367 | wallet_hotkey = Prompt.ask(
|
2367 |
| - f"Enter the the name of the [{COLOR_PALETTE['GENERAL']['HOTKEY']}]new hotkey", |
| 2368 | + f"Enter the the name of the [{COLORS.G.HK}]new hotkey", |
2368 | 2369 | default=defaults.wallet.hotkey,
|
2369 | 2370 | )
|
2370 | 2371 |
|
@@ -2742,9 +2743,10 @@ def wallet_sign(
|
2742 | 2743 | self.verbosity_handler(quiet, verbose)
|
2743 | 2744 | if use_hotkey is None:
|
2744 | 2745 | use_hotkey = Confirm.ask(
|
2745 |
| - f"Would you like to sign the transaction using your [{COLOR_PALETTE['GENERAL']['HOTKEY']}]hotkey[/{COLOR_PALETTE['GENERAL']['HOTKEY']}]?" |
2746 |
| - f"\n[Type [{COLOR_PALETTE['GENERAL']['HOTKEY']}]y[/{COLOR_PALETTE['GENERAL']['HOTKEY']}] for [{COLOR_PALETTE['GENERAL']['HOTKEY']}]hotkey[/{COLOR_PALETTE['GENERAL']['HOTKEY']}]" |
2747 |
| - f" and [{COLOR_PALETTE['GENERAL']['COLDKEY']}]n[/{COLOR_PALETTE['GENERAL']['COLDKEY']}] for [{COLOR_PALETTE['GENERAL']['COLDKEY']}]coldkey[/{COLOR_PALETTE['GENERAL']['COLDKEY']}]] (default is [{COLOR_PALETTE['GENERAL']['COLDKEY']}]coldkey[/{COLOR_PALETTE['GENERAL']['COLDKEY']}])", |
| 2746 | + f"Would you like to sign the transaction using your [{COLORS.G.HK}]hotkey[/{COLORS.G.HK}]?" |
| 2747 | + f"\n[Type [{COLORS.G.HK}]y[/{COLORS.G.HK}] for [{COLORS.G.HK}]hotkey[/{COLORS.G.HK}]" |
| 2748 | + f" and [{COLORS.G.CK}]n[/{COLORS.G.CK}] for [{COLORS.G.CK}]coldkey[/{COLORS.G.CK}]] " |
| 2749 | + f"(default is [{COLORS.G.CK}]coldkey[/{COLORS.G.CK}])", |
2748 | 2750 | default=False,
|
2749 | 2751 | )
|
2750 | 2752 |
|
@@ -3035,11 +3037,11 @@ def stake_add(
|
3035 | 3037 | raise typer.Exit()
|
3036 | 3038 | if netuid is not None:
|
3037 | 3039 | amount = FloatPrompt.ask(
|
3038 |
| - f"Amount to [{COLOR_PALETTE['GENERAL']['SUBHEADING_MAIN']}]stake (TAO τ)" |
| 3040 | + f"Amount to [{COLORS.G.SUBHEAD_MAIN}]stake (TAO τ)" |
3039 | 3041 | )
|
3040 | 3042 | else:
|
3041 | 3043 | amount = FloatPrompt.ask(
|
3042 |
| - f"Amount to [{COLOR_PALETTE['GENERAL']['SUBHEADING_MAIN']}]stake to each netuid (TAO τ)" |
| 3044 | + f"Amount to [{COLORS.G.SUBHEAD_MAIN}]stake to each netuid (TAO τ)" |
3043 | 3045 | )
|
3044 | 3046 |
|
3045 | 3047 | if amount <= 0:
|
@@ -4112,7 +4114,8 @@ def sudo_set(
|
4112 | 4114 | if not param_value:
|
4113 | 4115 | if HYPERPARAMS.get(param_name):
|
4114 | 4116 | param_value = Prompt.ask(
|
4115 |
| - f"Enter the new value for [{COLOR_PALETTE['GENERAL']['SUBHEADING']}]{param_name}[/{COLOR_PALETTE['GENERAL']['SUBHEADING']}] in the VALUE column format" |
| 4117 | + f"Enter the new value for [{COLORS.G.SUBHEAD}]{param_name}[/{COLORS.G.SUBHEAD}] " |
| 4118 | + f"in the VALUE column format" |
4116 | 4119 | )
|
4117 | 4120 | else:
|
4118 | 4121 | param_value = None
|
|
0 commit comments