Skip to content

Commit

Permalink
Don't check size of PGP fingerprint if it's not set (#110)
Browse files Browse the repository at this point in the history
* Give user the UID immediately after root registration.

* Only check size of PGP fingerprint if it's actually set.
  • Loading branch information
thewhaleking authored Sep 23, 2024
1 parent cd8027c commit 25586af
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions bittensor_cli/src/commands/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ async def _get_total_balance(
(
await subtensor.get_balance(
*(x.coldkeypub.ss58_address for x in _balance_cold_wallets),
block_hash=block_hash
block_hash=block_hash,
)
).values()
)
Expand Down Expand Up @@ -610,8 +610,12 @@ async def overview(

coldkeys_to_check = []
ck_stakes = await subtensor.get_total_stake_for_coldkey(
*(coldkey_wallet.coldkeypub.ss58_address for coldkey_wallet in all_coldkey_wallets if coldkey_wallet.coldkeypub),
block_hash=block_hash
*(
coldkey_wallet.coldkeypub.ss58_address
for coldkey_wallet in all_coldkey_wallets
if coldkey_wallet.coldkeypub
),
block_hash=block_hash,
)
for coldkey_wallet in all_coldkey_wallets:
if coldkey_wallet.coldkeypub:
Expand Down Expand Up @@ -1479,7 +1483,11 @@ async def set_id(
}

for field, string in id_dict.items():
if field == "pgp_fingerprint" and len(pgp_fingerprint_encoded) != 20:
if (
field == "pgp_fingerprint"
and pgp_fingerprint
and len(pgp_fingerprint_encoded) != 20
):
err_console.print(
"[red]Error:[/red] PGP Fingerprint must be exactly 20 bytes."
)
Expand Down

0 comments on commit 25586af

Please sign in to comment.