fixed friends

master
Kevin Froman 2019-10-04 17:12:07 -05:00
parent 215c8d2c3a
commit e2832afacb
2 changed files with 6 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class ContactManager(onionrusers.OnionrUser):
try:
if mnemonickeys.DELIMITER in publicKey:
publicKey = mnemonickeys.get_base32(publicKey.split(mnemonickeys.DELIMITER))
publicKey = unpaddedbase32.b32encode(bytesconverter.str_to_bytes(publicKey))
#publicKey = unpaddedbase32.b32encode(bytesconverter.str_to_bytes(publicKey))
except ValueError:
pass
publicKey = bytesconverter.bytes_to_str(unpaddedbase32.repad(bytesconverter.str_to_bytes(publicKey)))

View File

@ -40,4 +40,8 @@ def get_human_readable_ID(pub=''):
def get_base32(words):
'''converts mnemonic to base32'''
return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.split(DELIMITER)))
try:
return unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words.split(DELIMITER)))
except AttributeError:
ret = unpaddedbase32.b32encode(niceware.passphrase_to_bytes(words))
return ret