Skip to content

Commit

Permalink
smart contract: support parse 0x-prefix address
Browse files Browse the repository at this point in the history
  • Loading branch information
icodeface committed Jun 15, 2021
1 parent 8bb7333 commit b82d784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions electrum/gui/qt/smart_contract_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ def parse_args(self):
if is_address(addr):
__, hash160 = b58_address_to_hash160(addr)
addr = hash160.hex()
if addr.startswith("0x"):
addr = addr[2:]
if not is_hash160(addr):
raise ParseArgsException('invalid input:{}'.format(args[index]))
args[index] = addr.lower()
Expand Down

0 comments on commit b82d784

Please sign in to comment.