From 08449a9c2973cfb1de53bfc9d4574fd711b838db Mon Sep 17 00:00:00 2001 From: curly60e <55191248+curly60e@users.noreply.github.com> Date: Mon, 12 Oct 2020 21:06:47 -0300 Subject: [PATCH 1/2] Modified colors Changed colors from blue to green on local balance --- nodeconnection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodeconnection.py b/nodeconnection.py index 7fc130f..ea413b0 100644 --- a/nodeconnection.py +++ b/nodeconnection.py @@ -608,7 +608,7 @@ def localrebalancelnd(): print("\t\nChannels\n") try: print("""\n\tLIST CHANNELS TO REBALANCE\n - \t\033[1;34;40mLOCAL\033[0;37;40m BALANCE \t\033[1;31;40mREMOTE\033[0;37;40m BALANCE + \t\033[2;32;40mLOCAL\033[0;37;40m BALANCE \t\033[1;31;40mREMOTE\033[0;37;40m BALANCE """) for r in range(len(n)): @@ -617,7 +617,7 @@ def localrebalancelnd(): total = int(s['local_balance']) - int(s['remote_balance']) elif int(s['local_balance']) <= int(s['remote_balance']): total = int(s['remote_balance']) - int(s['local_balance']) - print("Node ID: " + str(s['chan_id']) + "\t\033[1;34;40m " + str(s['local_balance']) + "\033[0;37;40m sats \033[1;31;40m\t" + str(s['remote_balance']) + "\033[0;37;40m sats \033[3;33;40m" + "\tDIFFERENCE: {}\033[0;37;40m sats".format(str(total)) ) + print("Node ID: " + str(s['chan_id']) + "\t\033[2;32;40m " + str(s['local_balance']) + "\033[0;37;40m sats \033[1;31;40m\t" + str(s['remote_balance']) + "\033[0;37;40m sats \033[3;33;40m" + "\tDIFFERENCE: {}\033[0;37;40m sats".format(str(total)) ) fromnode = input("\nSelect FROM a Node ID : ") tonode = input("\nSelect TO a Node ID : ") amt = input("\nAmount in sats: ") From 77a15a1297f200efe0432d7bf6e1084c8efbb56b Mon Sep 17 00:00:00 2001 From: Sourcery AI <> Date: Tue, 13 Oct 2020 00:07:20 +0000 Subject: [PATCH 2/2] 'Refactored by Sourcery' --- nodeconnection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodeconnection.py b/nodeconnection.py index ea413b0..53233cd 100644 --- a/nodeconnection.py +++ b/nodeconnection.py @@ -611,8 +611,8 @@ def localrebalancelnd(): \t\033[2;32;40mLOCAL\033[0;37;40m BALANCE \t\033[1;31;40mREMOTE\033[0;37;40m BALANCE """) - for r in range(len(n)): - s = n[r] + for item in n: + s = item if int(s['local_balance']) >= int(s['remote_balance']): total = int(s['local_balance']) - int(s['remote_balance']) elif int(s['local_balance']) <= int(s['remote_balance']):