From 19bc4af9075773b51c31f501cc27aa3970381f10 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 6 Sep 2024 12:20:20 +0000 Subject: [PATCH] Autosign: set up the macOS ramdisk after generating key --- mmgen/autosign.py | 7 ++++++- mmgen/main_autosign.py | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mmgen/autosign.py b/mmgen/autosign.py index dec3fa56..e1e1ad24 100755 --- a/mmgen/autosign.py +++ b/mmgen/autosign.py @@ -664,9 +664,14 @@ class Autosign: except: die(2,f"Unable to create wallet directory '{self.wallet_dir}'") + self.gen_key(no_unmount=True) + + if sys.platform == 'darwin': + self.macos_ramdisk_setup() + remove_wallet_dir() create_wallet_dir() - self.gen_key(no_unmount=True) + wf = find_file_in_dir( get_wallet_cls('mmgen'), self.cfg.data_dir ) if wf and keypress_confirm( cfg = self.cfg, diff --git a/mmgen/main_autosign.py b/mmgen/main_autosign.py index 448eafe7..53cc9cc3 100755 --- a/mmgen/main_autosign.py +++ b/mmgen/main_autosign.py @@ -211,8 +211,6 @@ cfg._post_init() if cmd == 'gen_key': asi.gen_key() elif cmd == 'setup': - if sys.platform == 'darwin': - asi.macos_ramdisk_setup() asi.setup() from .ui import keypress_confirm if cfg.xmrwallets and keypress_confirm( cfg, '\nContinue with Monero setup?', default_yes=True ):