mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
gui_stdio: fix tabs->spaces
This commit is contained in:
parent
56ebc02cad
commit
c7f776c5ca
1 changed files with 14 additions and 14 deletions
|
@ -60,10 +60,10 @@ class ElectrumGui:
|
||||||
elif c == "s" : self.send_order()
|
elif c == "s" : self.send_order()
|
||||||
elif c == "r" : self.print_addresses()
|
elif c == "r" : self.print_addresses()
|
||||||
elif c == "c" : self.print_contacts()
|
elif c == "c" : self.print_contacts()
|
||||||
elif c == "b" : self.print_banner()
|
elif c == "b" : self.print_banner()
|
||||||
elif c == "n" : self.network_dialog()
|
elif c == "n" : self.network_dialog()
|
||||||
elif c == "e" : self.settings_dialog()
|
elif c == "e" : self.settings_dialog()
|
||||||
elif c == "q" : self.done = 1
|
elif c == "q" : self.done = 1
|
||||||
else: self.print_commands()
|
else: self.print_commands()
|
||||||
|
|
||||||
def peers(self):
|
def peers(self):
|
||||||
|
@ -73,13 +73,13 @@ class ElectrumGui:
|
||||||
print (s)
|
print (s)
|
||||||
|
|
||||||
def connected(self):
|
def connected(self):
|
||||||
print ("connected")
|
print ("connected")
|
||||||
|
|
||||||
def disconnected(self):
|
def disconnected(self):
|
||||||
print ("disconnected")
|
print ("disconnected")
|
||||||
|
|
||||||
def disconnecting(self):
|
def disconnecting(self):
|
||||||
print ("disconnecting")
|
print ("disconnecting")
|
||||||
|
|
||||||
def updated(self):
|
def updated(self):
|
||||||
s = self.get_balance()
|
s = self.get_balance()
|
||||||
|
@ -100,12 +100,12 @@ class ElectrumGui:
|
||||||
messages = []
|
messages = []
|
||||||
|
|
||||||
for item in self.wallet.get_tx_history():
|
for item in self.wallet.get_tx_history():
|
||||||
tx_hash, conf, is_mine, value, fee, balance, timestamp = item
|
tx_hash, confirmations, is_mine, value, fee, balance, timestamp = item
|
||||||
if conf:
|
if confirmations:
|
||||||
try:
|
try:
|
||||||
time_str = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3]
|
time_str = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3]
|
||||||
except:
|
except:
|
||||||
time_str = "------"
|
time_str = "unknown"
|
||||||
else:
|
else:
|
||||||
time_str = 'pending'
|
time_str = 'pending'
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class ElectrumGui:
|
||||||
|
|
||||||
|
|
||||||
def print_balance(self):
|
def print_balance(self):
|
||||||
print(self.get_balance())
|
print(self.get_balance())
|
||||||
|
|
||||||
def get_balance(self):
|
def get_balance(self):
|
||||||
if self.wallet.network.interface and self.wallet.network.interface.is_connected:
|
if self.wallet.network.interface and self.wallet.network.interface.is_connected:
|
||||||
|
@ -141,7 +141,7 @@ class ElectrumGui:
|
||||||
self.print_list(messages, "%19s %25s "%("Address", "Label"))
|
self.print_list(messages, "%19s %25s "%("Address", "Label"))
|
||||||
|
|
||||||
def print_order(self):
|
def print_order(self):
|
||||||
print("send order to " + self.str_recipient + ", amount: " + self.str_amount \
|
print("send order to " + self.str_recipient + ", amount: " + self.str_amount \
|
||||||
+ "\nfee: " + self.str_fee + ", desc: " + self.str_description)
|
+ "\nfee: " + self.str_fee + ", desc: " + self.str_description)
|
||||||
|
|
||||||
def enter_order(self):
|
def enter_order(self):
|
||||||
|
@ -151,7 +151,7 @@ class ElectrumGui:
|
||||||
self.str_fee = raw_input("Fee: ")
|
self.str_fee = raw_input("Fee: ")
|
||||||
|
|
||||||
def send_order(self):
|
def send_order(self):
|
||||||
self.do_send()
|
self.do_send()
|
||||||
|
|
||||||
def print_banner(self):
|
def print_banner(self):
|
||||||
for i, x in enumerate( self.wallet.network.banner.split('\n') ):
|
for i, x in enumerate( self.wallet.network.banner.split('\n') ):
|
||||||
|
@ -160,7 +160,7 @@ class ElectrumGui:
|
||||||
def print_list(self, list, firstline):
|
def print_list(self, list, firstline):
|
||||||
self.maxpos = len(list)
|
self.maxpos = len(list)
|
||||||
if not self.maxpos: return
|
if not self.maxpos: return
|
||||||
print(firstline)
|
print(firstline)
|
||||||
for i in range(self.maxpos):
|
for i in range(self.maxpos):
|
||||||
msg = list[i] if i < len(list) else ""
|
msg = list[i] if i < len(list) else ""
|
||||||
print(msg)
|
print(msg)
|
||||||
|
|
Loading…
Add table
Reference in a new issue