ts_ethdev: fee prompt cleanups
This commit is contained in:
parent
4946af328a
commit
25a4361101
2 changed files with 7 additions and 14 deletions
|
|
@ -578,9 +578,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
acct = '1',
|
||||
caller = 'txcreate',
|
||||
interactive_fee = '50G',
|
||||
eth_fee_res = None,
|
||||
fee_info_data = ('0.00105','50'),
|
||||
fee_desc = 'gas price',
|
||||
no_read = False,
|
||||
tweaks = [] ):
|
||||
fee_info_pat = r'\D{}\D.*{c} .*\D{}\D.*gas price in Gwei'.format( *fee_info_data, c=self.proto.coin )
|
||||
|
|
@ -596,8 +594,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
bad_input_sels = True,
|
||||
interactive_fee = interactive_fee,
|
||||
fee_info_pat = fee_info_pat,
|
||||
fee_desc = fee_desc,
|
||||
eth_fee_res = eth_fee_res,
|
||||
fee_desc = 'transaction fee or gas price',
|
||||
add_comment = tx_comment_jp,
|
||||
tweaks = tweaks )
|
||||
if not no_read:
|
||||
|
|
@ -787,8 +784,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
args = ['98831F3A:E:2,23.45495'],
|
||||
acct = '1',
|
||||
interactive_fee = '40G',
|
||||
fee_info_data = ('0.00084','40'),
|
||||
eth_fee_res = True )
|
||||
fee_info_data = ('0.00084','40') )
|
||||
|
||||
def txbump(self,ext=',40000]{}.regtest.rawtx',fee='50G',add_args=[]):
|
||||
ext = ext.format('-α' if cfg.debug_utf8 else '')
|
||||
|
|
@ -1138,7 +1134,7 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared):
|
|||
return self.bal_getbalance(dfl_sid,'2',extra_args=['--token=mm1'])
|
||||
|
||||
def txcreate_noamt(self):
|
||||
return self.txcreate(args=['98831F3A:E:12'],eth_fee_res=True)
|
||||
return self.txcreate(args=['98831F3A:E:12'])
|
||||
def txsign_noamt(self):
|
||||
return self.txsign(ext='99.99895,50000]{}.regtest.rawtx')
|
||||
def txsend_noamt(self):
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ class TestSuiteShared(object):
|
|||
interactive_fee = '',
|
||||
fee_desc = 'transaction fee',
|
||||
fee_info_pat = None,
|
||||
eth_fee_res = None,
|
||||
add_comment = '',
|
||||
view = 't',
|
||||
save = True,
|
||||
|
|
@ -79,23 +78,21 @@ class TestSuiteShared(object):
|
|||
|
||||
t.expect(input_sels_prompt+': ',inputs+'\n')
|
||||
|
||||
have_est_fee = t.expect([fee_desc+': ','OK? (Y/n): ']) == 1
|
||||
have_est_fee = t.expect([f'{fee_desc}: ','OK? (Y/n): ']) == 1
|
||||
|
||||
if have_est_fee and not interactive_fee:
|
||||
t.send('y')
|
||||
else:
|
||||
if have_est_fee:
|
||||
t.send('n')
|
||||
if eth_fee_res:
|
||||
t.expect('or gas price: ',interactive_fee+'\n')
|
||||
elif have_est_fee and self.proto.base_coin != 'ETH':
|
||||
t.expect('fee: ',interactive_fee+'\n')
|
||||
t.expect(f'{fee_desc}: ',interactive_fee+'\n')
|
||||
else:
|
||||
t.send(interactive_fee+'\n')
|
||||
if fee_info_pat:
|
||||
t.expect(fee_info_pat,regex=True)
|
||||
t.expect('OK? (Y/n): ','y')
|
||||
|
||||
t.expect('(Y/n): ','\n') # chg amt OK?
|
||||
t.expect('(Y/n): ','\n') # chg amt OK prompt
|
||||
|
||||
if 'confirm_non_mmgen' in tweaks:
|
||||
t.expect('Continue? (Y/n)','\n')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue