From 6238e833a165b1bcdd45a717c194d2625d142854 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Mon, 9 Nov 2026 09:33:34 +0000 Subject: [PATCH] mmgen-txcreate: XMR compat: exit cleanly if no op specified --- mmgen/tx/new.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mmgen/tx/new.py b/mmgen/tx/new.py index 4132ea47..29302331 100644 --- a/mmgen/tx/new.py +++ b/mmgen/tx/new.py @@ -10,6 +10,7 @@ tx.new: new transaction class """ +import sys from collections import namedtuple from .base import Base @@ -57,7 +58,6 @@ def mmaddr2coinaddr(cfg, mmaddr, ad_w, ad_f, proto): msg(wmsg('addr_in_addrfile_only')) from ..ui import keypress_confirm if not (cfg.yes or keypress_confirm(cfg, 'Continue anyway?')): - import sys sys.exit(1) else: die(2, wmsg('addr_not_found')) @@ -518,7 +518,6 @@ class New(Base): if do_info: del self.twctl del self.twuo.twctl - import sys sys.exit(0) if not self.is_sweep: @@ -560,6 +559,8 @@ class New(Base): if self.is_compat: self.compat_data = await self.compat_create() + if not self.compat_data: + sys.exit(1) self.send_amt = self.compat_data['data']['amount'] self.txid = self.compat_data['base_chksum'].upper() else: