From bd411b1be474d478daf2cfd7049047b7660f0d71 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 7 Dec 2022 10:40:57 +0000 Subject: [PATCH] tw.view: cleanup prompts --- mmgen/proto/btc/tw/addresses.py | 4 ++-- mmgen/proto/btc/tw/txhistory.py | 9 ++++----- mmgen/proto/btc/tw/unspent.py | 9 +++++---- mmgen/proto/eth/tw/addresses.py | 4 ++-- mmgen/proto/eth/tw/unspent.py | 6 +++--- test/test_py_d/ts_main.py | 2 +- test/test_py_d/ts_regtest.py | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mmgen/proto/btc/tw/addresses.py b/mmgen/proto/btc/tw/addresses.py index c97c562b..1e0252cc 100755 --- a/mmgen/proto/btc/tw/addresses.py +++ b/mmgen/proto/btc/tw/addresses.py @@ -23,11 +23,11 @@ class BitcoinTwAddresses(TwAddresses,BitcoinTwRPC): has_age = True prompt = """ -Sort options: [a]mt, [A]ge, [M]mid, [r]everse +Sort options: [a]mt, [A]ge, [M]mgen addr, [r]everse Column options: toggle [D]ays/date/confs/block Filters: show [E]mpty addrs, [u]sed addrs, all [L]abels View/Print: pager [v]iew, [w]ide view, [p]rint -Actions: [q]uit, r[e]draw, add [l]abel: +Actions: [q]uit view, r[e]draw, add [l]abel: """ key_mappings = { 'a':'s_amt', diff --git a/mmgen/proto/btc/tw/txhistory.py b/mmgen/proto/btc/tw/txhistory.py index 45aef990..57bb44ae 100755 --- a/mmgen/proto/btc/tw/txhistory.py +++ b/mmgen/proto/btc/tw/txhistory.py @@ -231,15 +231,14 @@ class BitcoinTwTxHistory(TwTxHistory,BitcoinTwRPC): item_desc = 'transaction' no_data_errmsg = 'No transactions in tracking wallet!' prompt = """ -Sort options: [t]xid, [a]mt, total a[m]t, [A]ge, [b]locknum, [r]everse -Column options: toggle [D]ays/date/confs/block, tx[i]d, [T]otal amt -Filters: show [u]nconfirmed +Sorting: [t]xid, [a]mt, total a[m]t, [A]ge, block[n]um, [r]everse +Column opts: toggle [D]ays/date/confs/block, tx[i]d, [T]otal amt View/Print: pager [v]iew, full [V]iew, screen [p]rint, full [P]rint -Actions: [q]uit, r[e]draw: +Filters/Actions: show [u]nconfirmed, [q]uit view, r[e]draw: """ key_mappings = { 'A':'s_age', - 'b':'s_blockheight', + 'n':'s_blockheight', 'a':'s_amt', 'm':'s_total_amt', 't':'s_txid', diff --git a/mmgen/proto/btc/tw/unspent.py b/mmgen/proto/btc/tw/unspent.py index 247275c0..295dc1ae 100755 --- a/mmgen/proto/btc/tw/unspent.py +++ b/mmgen/proto/btc/tw/unspent.py @@ -31,9 +31,10 @@ class BitcoinTwUnspentOutputs(TwUnspentOutputs): dump_fn_pfx = 'listunspent' prompt_fs = 'Total to spend, excluding fees: {} {}\n\n' prompt = """ -Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr -Display options: toggle [D]ays/date, show [g]roup, show [m]mgen addr, r[e]draw -Actions: [q]uit view, [p]rint to file, pager [v]iew, [w]ide view, add [l]abel: +Sort options: [t]xid, [a]mount, a[d]dr, [A]ge, [r]everse, [M]mid +Display options: toggle [D]ays/date, show gr[o]up, show [m]mid +View options: pager [v]iew, [w]ide view +Actions: [q]uit view, [p]rint, r[e]draw, add [l]abel: """ key_mappings = { 't':'s_txid', @@ -43,7 +44,7 @@ Actions: [q]uit view, [p]rint to file, pager [v]iew, [w]ide view, add [l]abel: 'r':'d_reverse', 'M':'s_twmmid', 'D':'d_days', - 'g':'d_group', + 'o':'d_group', 'm':'d_mmid', 'e':'d_redraw', 'q':'a_quit', diff --git a/mmgen/proto/eth/tw/addresses.py b/mmgen/proto/eth/tw/addresses.py index f30af468..2bd60ebe 100755 --- a/mmgen/proto/eth/tw/addresses.py +++ b/mmgen/proto/eth/tw/addresses.py @@ -22,10 +22,10 @@ class EthereumTwAddresses(TwAddresses,EthereumTwView,EthereumTwRPC): has_age = False prompt = """ -Sort options: [a]mt, [M]mid, [r]everse +Sort options: [a]mt, [M]mgen addr, [r]everse Filters: show [E]mpty addrs, all [L]abels View/Print: pager [v]iew, [w]ide view, [p]rint -Actions: [q]uit, r[e]draw, [D]elete address, add [l]abel: +Actions: [q]uit view, r[e]draw, [D]elete addr, add [l]abel: """ key_mappings = { 'a':'s_amt', diff --git a/mmgen/proto/eth/tw/unspent.py b/mmgen/proto/eth/tw/unspent.py index da0733fe..fe6851f6 100755 --- a/mmgen/proto/eth/tw/unspent.py +++ b/mmgen/proto/eth/tw/unspent.py @@ -46,10 +46,10 @@ class EthereumTwUnspentOutputs(EthereumTwView,TwUnspentOutputs): item_desc = 'account' dump_fn_pfx = 'balances' prompt = """ -Sort options: [a]mount, a[d]dress, [r]everse, [M]mgen addr +Sort options: [a]mount, a[d]dress, [r]everse, [M]mgen addr Display options: show [m]mgen addr, r[e]draw screen -Actions: [q]uit view, [p]rint to file, pager [v]iew, [w]ide view, - [D]elete address, add [l]abel, [R]efresh balance: +View options: [q]uit view, [p]rint to file, [v]iew, [w]ide view +Actions: [D]elete addr, add [l]abel, [R]efresh balance: """ key_mappings = { 'a':'s_amt', diff --git a/test/test_py_d/ts_main.py b/test/test_py_d/ts_main.py index 9e268b4c..b58134c2 100755 --- a/test/test_py_d/ts_main.py +++ b/test/test_py_d/ts_main.py @@ -526,7 +526,7 @@ class TestSuiteMain(TestSuiteBase,TestSuiteShared): outputs_list.append(len(tx_data)*(addrs_per_wallet+1) + 1) self.txcreate_ui_common(t, - menu = (['M'],['M','D','D','D','D','m','g'])[self.test_name=='txcreate'], + menu = (['M'],['M','D','D','D','D','m','o'])[self.test_name=='txcreate'], inputs = ' '.join(map(str,outputs_list)), add_comment = ('',tx_comment_lat_cyr_gr)[do_label], view = view, diff --git a/test/test_py_d/ts_regtest.py b/test/test_py_d/ts_regtest.py index e91df86c..e6824efc 100755 --- a/test/test_py_d/ts_regtest.py +++ b/test/test_py_d/ts_regtest.py @@ -765,14 +765,14 @@ class TestSuiteRegtest(TestSuiteBase,TestSuiteShared): self.get_file_with_ext('out',delete_all=True) t = self.spawn('mmgen-tool', ['--bob',f'--outdir={self.tmpdir}','txhist','age_fmt=date_time','interactive=true'] ) - for resp in ('u','i','t','a','m','T','A','r','r','D','D','D','D','p','P','b','V'): + for resp in ('u','i','t','a','m','T','A','r','r','D','D','D','D','p','P','n','V'): t.expect('draw:\b',resp,regex=True) if t.pexpect_spawn: t.expect(r'Block:.*\b394\b',regex=True) time.sleep(1) t.send('q') time.sleep(0.2) - t.send('b') + t.send('n') t.expect('draw:\b','q',regex=True) else: txnum,idx = (8,1) if self.proto.coin == 'BCH' else (9,3)