Skip to content

Commit fc45446

Browse files
authored
Fix leading zeros in web3signer keys (#44)
1 parent 1861205 commit fc45446

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stakewise_cli/commands/sync_web3signer_keys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def sync_web3signer_keys(db_url: str, output_dir: str, decryption_key_env: str)
5050
private_keys: List[str] = []
5151
for key_record in keys_records:
5252
key = decoder.decrypt(data=key_record["private_key"], nonce=key_record["nonce"])
53-
private_keys.append(Web3.toHex(int(key)))
53+
hex = Web3.toHex(int(key))
54+
private_keys.append(f"0x{hex[2:].zfill(64)}") # pad missing leading zeros
5455

5556
if not exists(output_dir):
5657
mkdir(output_dir)

0 commit comments

Comments
 (0)