Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
marmarainfo
  • Loading branch information
tonymorony committed Jan 21, 2019
1 parent d3a4375 commit 200f89f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/tuilib.py
Expand Up @@ -968,3 +968,23 @@ def marmara_lock_tui(rpc_connection):
print("Something went wrong. Please check your input")
input("Press [Enter] to continue...")
break


def marmara_info_tui(rpc_connection):
while True:
firstheight = int(input("Input first height (default 0): ")) or 0
lastheight = int(input("Input last height (default current (0) ): ")) or 0
minamount = int(input("Input min amount (default 0): ")) or 0
maxamount = int(input("Input max amount (default 0): ")) or 0
issuerpk = input("Optional: input issuer public key ") or None
try:
marmara_info = rpc_connection.marmarainfo(firstheight, lastheight, minamount, maxamount, issuerpk)
print(json.dumps(marmara_info, indent=4, sort_keys=True) + "\n")
input("Press [Enter] to continue...")
break
except Exception as e:
print(marmara_info)
print(e)
print("Something went wrong. Please check your input")
input("Press [Enter] to continue...")
break
1 change: 1 addition & 0 deletions marmara_tui.py
Expand Up @@ -17,6 +17,7 @@
menuItems = [
{"Check current connection": tuilib.getinfo_tui},
{"Check mempool": tuilib.print_mempool},
{"Check MARMARA info": tuilib.marmara_info_tui},
{"Lock funds for MARMARA": tuilib.marmara_lock_tui},
{"Request MARMARA cheque": tuilib.marmara_receive_tui},
{"Issue MARMARA cheque": tuilib.marmara_issue_tui},
Expand Down

0 comments on commit 200f89f

Please sign in to comment.