From b5c4b134c909aa7c8e0f54a11cd4636af2ea96ac Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Sat, 29 Aug 2026 15:04:29 +0000 Subject: [PATCH] txcreate, txsign: enforce `cfg.autosign` if `cfg.coin == 'XMR'` --- mmgen/main_txcreate.py | 1 + mmgen/main_txsend.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mmgen/main_txcreate.py b/mmgen/main_txcreate.py index 21e4e167..1ff16b21 100755 --- a/mmgen/main_txcreate.py +++ b/mmgen/main_txcreate.py @@ -33,6 +33,7 @@ opts_data = { 'swaptx': ['-', 's'], }[target], 'sets': [('yes', True, 'quiet', True)], + 'requires': [('coin', 'XMR', 'autosign', True)], 'text': { 'desc': { 'tx': f'Create a transaction with outputs to specified coin or {gc.proj_name} addresses', diff --git a/mmgen/main_txsend.py b/mmgen/main_txsend.py index 14f79911..c53ca46d 100755 --- a/mmgen/main_txsend.py +++ b/mmgen/main_txsend.py @@ -155,6 +155,8 @@ async def process_tx(tx): cfg._util.vmsg(f'Getting {tx.desc} ‘{tx.infile}’') if tx.is_compat: + if not cfg.autosign: + die(1, 'Sending XMR transaction via compatibility layer requires --autosign') return await tx.compat_send() txcfg = Config({'_clone': cfg, 'proto': tx.proto, 'coin': tx.proto.coin})