Skip to content
Snippets Groups Projects
Commit 5a841f33 authored by poka's avatar poka
Browse files

Merge branch 'fix_typo' into 'master'

Fix typo in variable name: pubkey_length

See merge request !1
parents 853e597b d7d0d306
No related branches found
No related tags found
1 merge request!1Fix typo in variable name: pubkey_length
...@@ -5,11 +5,11 @@ from substrateinterface import Keypair, KeypairType ...@@ -5,11 +5,11 @@ from substrateinterface import Keypair, KeypairType
def v1_pubkey_to_v2_address(pubkey): def v1_pubkey_to_v2_address(pubkey):
pubkey_bytes = base58.b58decode(pubkey) pubkey_bytes = base58.b58decode(pubkey)
pubkey_lenght = len(pubkey_bytes) pubkey_length = len(pubkey_bytes)
# Add 0 head byte to pubkey so as to reach 32 bytes # Add 0 head byte to pubkey so as to reach 32 bytes
if pubkey_lenght < 32: if pubkey_length < 32:
pubkey_bytes = bytes([0]*(32-pubkey_lenght)) + pubkey_bytes pubkey_bytes = bytes([0]*(32-pubkey_length)) + pubkey_bytes
# get incomplete Substrate keypair (only public key) from public key bytes # get incomplete Substrate keypair (only public key) from public key bytes
keypair = Keypair(public_key=pubkey_bytes, ss58_format=42, crypto_type=KeypairType.ED25519) keypair = Keypair(public_key=pubkey_bytes, ss58_format=42, crypto_type=KeypairType.ED25519)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment