Skip to content

Commit

Permalink
show exceptedMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
icodeface committed Sep 7, 2020
1 parent 292dc9a commit 84cd9d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions electrum/gui/qt/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -3510,6 +3510,10 @@ def call_smart_contract(self, address: str, func: dict, args: list, sender: str,
types = list([x['type'] for x in func.get('outputs', [])])
try:
if isinstance(result, dict):
except_msg = result.get('executionResult', {}).get('exceptedMessage', '')
if len(except_msg) > 1:
dialog.show_message(f"exceptedMessage: {except_msg}")
return
output = eth_abi.decode_abi(types, binascii.a2b_hex(result['executionResult']['output']))
else:
output = eth_abi.decode_abi(types, binascii.a2b_hex(result))
Expand Down

0 comments on commit 84cd9d3

Please sign in to comment.