tw.view: whitespace, minor cleanups
This commit is contained in:
parent
e69dfbe8f3
commit
870b24cd1d
3 changed files with 13 additions and 14 deletions
|
|
@ -27,7 +27,7 @@ class OnlineSigned(Completed):
|
|||
msg(self.compat_tx.get_info())
|
||||
elif not self.cfg.quiet:
|
||||
from ....obj import CoinTxID
|
||||
msg('TxID: {}'.format(CoinTxID(txid).hl()))
|
||||
msg('{} TxID: {}'.format(self.cfg.coin, CoinTxID(txid).hl()))
|
||||
res = op.dc.call_raw('get_transactions', txs_hashes=[txid])
|
||||
if res['status'] == 'OK':
|
||||
tx = res['txs'][0]
|
||||
|
|
|
|||
|
|
@ -175,11 +175,11 @@ class TwView(MMGenObject, metaclass=AsyncInit):
|
|||
'f': 'm_pg_down',
|
||||
'g': 'm_top',
|
||||
'G': 'm_bot'},
|
||||
'linux': {
|
||||
'\x1b[A': 'm_cursor_up',
|
||||
'\x1b[B': 'm_cursor_down',
|
||||
'\x1b[5~': 'm_pg_up',
|
||||
'\x1b[6~': 'm_pg_down',
|
||||
'linux': { # Terminfo codes:
|
||||
'\x1b[A': 'm_cursor_up', # cuu
|
||||
'\x1b[B': 'm_cursor_down', # cud
|
||||
'\x1b[5~': 'm_pg_up', # kpp
|
||||
'\x1b[6~': 'm_pg_down', # knp
|
||||
'\x1b[7~': 'm_top',
|
||||
'\x1b[8~': 'm_bot'},
|
||||
'win32': {
|
||||
|
|
@ -584,8 +584,7 @@ class TwView(MMGenObject, metaclass=AsyncInit):
|
|||
if scroll:
|
||||
for k in self.scroll_keys['vi']:
|
||||
assert k not in self.key_mappings, f'{k!r} is in key_mappings'
|
||||
self.key_mappings.update(self.scroll_keys['vi'])
|
||||
self.key_mappings.update(self.scroll_keys[sys.platform])
|
||||
self.key_mappings.update(self.scroll_keys['vi'] | self.scroll_keys[sys.platform])
|
||||
return self.key_mappings
|
||||
|
||||
def cleanup(add_nl=False):
|
||||
|
|
@ -773,12 +772,12 @@ class TwView(MMGenObject, metaclass=AsyncInit):
|
|||
|
||||
while True:
|
||||
# action_method return values:
|
||||
# True: action successfully performed
|
||||
# False: an error occurred
|
||||
# None: action aborted by user or no action performed
|
||||
# 'redo': user will be re-prompted for item number
|
||||
# True: action successfully performed
|
||||
# False: an error occurred
|
||||
# None: action aborted by user or no action performed
|
||||
# 'redo': user will be re-prompted for item number
|
||||
# 'redraw': action successfully performed, screen will be redrawn
|
||||
# 'erase': action successfully performed, screen will be erased
|
||||
# 'erase': action successfully performed, screen will be erased
|
||||
if usr_ret := await parent.get_idx_from_user(action_method.__name__):
|
||||
ret = await action_method(parent, usr_ret.idx, usr_ret.acct_addr_idx)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class OnlineSigned(Signed):
|
|||
if coin_txid := getattr(self, f'coin_txid{idx}', None):
|
||||
txhex = getattr(self, f'serialized{idx}')
|
||||
if cfg.status:
|
||||
cfg._util.qmsg(f'{self.proto.coin} txid: {coin_txid.hl()}')
|
||||
cfg._util.qmsg(f'{self.proto.coin} TxID: {coin_txid.hl()}')
|
||||
if cfg.verbose:
|
||||
await self.post_network_send(coin_txid)
|
||||
status_exitval = await self.status.display(idx=idx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue