From b361bab73a2835a6e74862d5c51d37fd63e972fb Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 15 Jun 2025 09:17:02 +0000 Subject: [PATCH] minor fixes and cleanups --- mmgen/proto/rune/rpc/remote.py | 6 +++--- test/cmdtest_d/include/pexpect.py | 4 +++- test/cmdtest_d/swap.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mmgen/proto/rune/rpc/remote.py b/mmgen/proto/rune/rpc/remote.py index fd384580..930ebcb9 100755 --- a/mmgen/proto/rune/rpc/remote.py +++ b/mmgen/proto/rune/rpc/remote.py @@ -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) diff --git a/test/cmdtest_d/include/pexpect.py b/test/cmdtest_d/include/pexpect.py index 3b88a7ad..f70042fe 100755 --- a/test/cmdtest_d/include/pexpect.py +++ b/test/cmdtest_d/include/pexpect.py @@ -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): diff --git a/test/cmdtest_d/swap.py b/test/cmdtest_d/swap.py index 966d982d..f4ee047d 100755 --- a/test/cmdtest_d/swap.py +++ b/test/cmdtest_d/swap.py @@ -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')