minor fixes and cleanups

This commit is contained in:
The MMGen Project 2025-06-15 09:17:02 +00:00
commit b361bab73a
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 7 additions and 5 deletions

View file

@ -70,12 +70,12 @@ class THORChainRemoteRPCClient(RemoteRPCClient):
self.rest_api.get(path=f'/auth/accounts/{addr}'),
errmsg = f'address ‘{addr}’ not found in blockchain')['value']
def get_tx_info(self, txhash):
def get_tx_info(self, txid):
return process_response(
self.rpc_api.post(
path = '/tx',
data = {'hash': '0x' + txhash}),
errmsg = f'get info for transaction {txhash} failed')
data = {'hash': '0x' + txid}),
errmsg = f'get info for transaction {txid} failed')
def tx_op(self, txhex, op=None):
assert isinstance(txhex, str)

View file

@ -85,7 +85,9 @@ class CmdTestPexpect:
def view_tx(self, view):
self.expect(r'View.* transaction.*\? .*: ', view, regex=True)
if view not in 'vn\n':
if cfg.pexpect_spawn and view == 'v':
self.expect('END', 'q')
elif view not in 'vn\n':
self.expect('to continue: ', '\n')
def do_comment(self, add_comment, has_label=False):

View file

@ -204,7 +204,7 @@ class CmdTestSwapMethods:
no_passthru_opts = ['coin'])
if spawn_only:
return t
t.expect('view: ', 'v')
t.view_tx('v')
if status:
return t
t.expect('(y/N): ', 'n')