Browse Source

minor fixes and cleanups

The MMGen Project 5 months ago
parent
commit
b361bab73a
3 changed files with 7 additions and 5 deletions
  1. 3 3
      mmgen/proto/rune/rpc/remote.py
  2. 3 1
      test/cmdtest_d/include/pexpect.py
  3. 1 1
      test/cmdtest_d/swap.py

+ 3 - 3
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)

+ 3 - 1
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):

+ 1 - 1
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')