Catch invalid phone return value in verify script

This commit is contained in:
nolash 2021-04-13 19:43:35 +02:00
parent 2b0b94c501
commit 0663059a1d
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -343,7 +343,13 @@ class Verifier:
address_recovered = json.loads(b.decode('utf-8')) address_recovered = json.loads(b.decode('utf-8'))
address_recovered = address_recovered.replace('"', '') address_recovered = address_recovered.replace('"', '')
if strip_0x(address) != strip_0x(address_recovered): try:
address = strip_0x(address)
address_recovered = strip_0x(address_recovered)
except ValueError:
raise VerifierError(address_recovered, 'metadata (phone) address {} address recovered {}'.format(address, address_recovered))
if address != address_recovered:
raise VerifierError(address_recovered, 'metadata (phone)') raise VerifierError(address_recovered, 'metadata (phone)')