From 81c2a923a059182c232de79752f450fe0f84b823 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sun, 6 Sep 2026 10:08:41 +0000 Subject: [PATCH] tx.new: `cmd_args` -> `args` --- mmgen/main_txcreate.py | 2 +- mmgen/main_txdo.py | 2 +- mmgen/proto/xmr/tx/new.py | 6 +++--- mmgen/tx/new.py | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mmgen/main_txcreate.py b/mmgen/main_txcreate.py index 1ff16b21..b3cbbec0 100755 --- a/mmgen/main_txcreate.py +++ b/mmgen/main_txcreate.py @@ -153,7 +153,7 @@ async def main(): tx1 = NewTX(cfg=cfg, proto=proto, target=target) tx2 = await tx1.create( - cmd_args = cfg._args, + args = cfg._args, locktime = int(cfg.locktime or 0), do_info = cfg.info) diff --git a/mmgen/main_txdo.py b/mmgen/main_txdo.py index 035f2b4a..03c43ce5 100755 --- a/mmgen/main_txdo.py +++ b/mmgen/main_txdo.py @@ -177,7 +177,7 @@ async def main(): tx1 = NewTX(cfg=cfg, proto=proto, target=target) tx2 = await tx1.create( - cmd_args = cfg._args, + args = cfg._args, locktime = int(cfg.locktime or 0), caller = 'txdo') diff --git a/mmgen/proto/xmr/tx/new.py b/mmgen/proto/xmr/tx/new.py index 09a726fe..a36f2d83 100755 --- a/mmgen/proto/xmr/tx/new.py +++ b/mmgen/proto/xmr/tx/new.py @@ -18,10 +18,10 @@ from .base import Base class New(Base, TxNew): - async def create(self, cmd_args, **kwargs): - self.is_sweep = not cmd_args + async def create(self, args, **kwargs): + self.is_sweep = not args self.sweep_spec = None - return await super().create(cmd_args, **kwargs) + return await super().create(args, **kwargs) async def get_input_addrs_from_inputs_opt(self): return [] # TODO diff --git a/mmgen/tx/new.py b/mmgen/tx/new.py index a290e754..e0fa44db 100755 --- a/mmgen/tx/new.py +++ b/mmgen/tx/new.py @@ -273,14 +273,14 @@ class New(Base): elif len(self.nondata_outputs) > 1: await self.warn_addr_used(self.proto, self.chg_output, 'change address') - def get_addrfiles_from_cmdline(self, cmd_args): + def get_addrfiles_from_cmdline(self, args): from ..addrfile import AddrFile addrfile_args = remove_dups( - tuple(a for a in cmd_args if get_extension(a) == AddrFile.ext), + tuple(a for a in args if get_extension(a) == AddrFile.ext), desc = 'command line', edesc = 'argument', ) - cmd_args = tuple(a for a in cmd_args if a not in addrfile_args) + cmd_args = tuple(a for a in args if a not in addrfile_args) if not self.is_swap: cmd_args = remove_dups(cmd_args, desc='command line', edesc='argument') return cmd_args, addrfile_args @@ -447,7 +447,7 @@ class New(Base): message = yellow(message), action = 'Are you sure this is what you want?') - async def create(self, cmd_args, *, locktime=None, do_info=False, caller='txcreate'): + async def create(self, args, *, locktime=None, do_info=False, caller='txcreate'): assert isinstance(locktime, int | type(None)), 'locktime must be of type int' @@ -457,7 +457,7 @@ class New(Base): self.add_comment(infile=self.cfg.comment_file) if not (do_info or self.is_sweep): - cmd_args, addrfile_args = self.get_addrfiles_from_cmdline(cmd_args) + cmd_args, addrfile_args = self.get_addrfiles_from_cmdline(args) if self.is_swap: cmd_args = await self.process_swap_cmdline_args(cmd_args, addrfile_args) if self.is_compat: