mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-18 13:08:54 +02:00
'Refactored by Sourcery'
This commit is contained in:
parent
dfad387bcf
commit
4ba3a34cb6
1 changed files with 28 additions and 23 deletions
|
|
@ -101,10 +101,15 @@ def counttxs():
|
|||
gna1 = str(gnaa)
|
||||
d = json.loads(gna1)
|
||||
e = len(d)
|
||||
n = e / 10
|
||||
outputtxs = render(str(e) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
outputtxs = render(
|
||||
f'{e} txs',
|
||||
colors=[settingsClock['colorA'], settingsClock['colorB']],
|
||||
align='center',
|
||||
font='tiny',
|
||||
)
|
||||
|
||||
print("\x1b[?25l" + outputtxs)
|
||||
shq = int(n)
|
||||
shq = e // 10
|
||||
ss = str(rectangle(shq))
|
||||
qq = ss.replace("None","")
|
||||
print(f"\033[A{qq}\033[A")
|
||||
|
|
@ -2553,7 +2558,7 @@ def APILnbitOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2603,7 +2608,7 @@ def APILnPay():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2647,7 +2652,7 @@ def APILnPayOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2695,7 +2700,7 @@ def APIOpenNode():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2739,7 +2744,7 @@ def APIOpenNodeOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2783,7 +2788,7 @@ def APITippinMe():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2819,7 +2824,7 @@ def APITippinMeOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2859,7 +2864,7 @@ def APITallyCo():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2896,7 +2901,7 @@ def APITallyCoOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -2981,7 +2986,7 @@ def settings4Remote():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
|
||||
|
|
@ -3023,7 +3028,7 @@ def designQ():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3069,7 +3074,7 @@ def designQOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3119,7 +3124,7 @@ def designC():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3165,7 +3170,7 @@ def designCOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3215,7 +3220,7 @@ def designCRemote():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3265,7 +3270,7 @@ def colors():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3302,7 +3307,7 @@ def colorsOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3343,7 +3348,7 @@ def colorsC():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3378,7 +3383,7 @@ def colorsCOnchainONLY():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
@ -3418,7 +3423,7 @@ def colorsCRemote():
|
|||
cert_path = lndconnectload["tls"]
|
||||
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
|
||||
headers = {'Grpc-Metadata-macaroon': macaroon}
|
||||
url = 'https://{}/v1/getinfo'.format(lndconnectload["ip_port"])
|
||||
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
|
||||
r = requests.get(url, headers=headers, verify=cert_path)
|
||||
alias = r.json()
|
||||
print("""\t\t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue