funga/crypto_dev_signer/common.py
2020-08-08 11:33:15 +02:00

12 lines
210 B
Python

def strip_hex_prefix(hx):
if hx[:2] == '0x':
return hx[2:]
return hx
def add_hex_prefix(hx):
if len(hx) < 2:
return hx
if hx[:2] != '0x':
return '0x' + hx
return hx