Fix bug in handling of data and recipeint inputs

This commit is contained in:
lash 2022-05-12 18:42:33 +00:00
parent 7ea2b43d60
commit f22115ff8c
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
2 changed files with 5 additions and 2 deletions

View File

@ -71,6 +71,7 @@ def process_settings_wallet(settings, config):
if wallet.get_signer_address() == None and recipient_in != None: if wallet.get_signer_address() == None and recipient_in != None:
recipient_in = wallet.from_address(recipient_in) recipient_in = wallet.from_address(recipient_in)
recipient_in = strip_0x(recipient_in)
recipient = to_checksum_address(recipient_in) recipient = to_checksum_address(recipient_in)
if not config.true('_UNSAFE') and recipient != recipient_in: if not config.true('_UNSAFE') and recipient != recipient_in:
raise ValueError('invalid checksum address: {}'.format(recipient_in)) raise ValueError('invalid checksum address: {}'.format(recipient_in))
@ -104,7 +105,10 @@ def process_settings_data(settings, config):
except KeyError: except KeyError:
return settings return settings
data = add_0x(config.get('_DATA')) if data == None:
return settings
data = add_0x(data)
settings.set('DATA', data) settings.set('DATA', data)
return settings return settings

View File

@ -4,4 +4,3 @@ hexathon~=0.1.7
websocket-client==0.57.0 websocket-client==0.57.0
potaahto~=0.1.1 potaahto~=0.1.1
chainlib~=0.3.0 chainlib~=0.3.0
confini~=0.6.0