xmrwallet.ops: sign, import: open wallet only if necessary

This commit is contained in:
The MMGen Project 2026-11-09 09:33:33 +00:00
commit a010fa3397
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 4 additions and 2 deletions

View file

@ -26,7 +26,8 @@ class OpImportOutputs(OpWallet):
async def process_wallet(self, d, fn, last):
h = MoneroWalletRPC(self, d)
h.open_wallet(refresh=False)
if self.need_daemon_start or len(self.kal.data) != 1:
h.open_wallet(refresh=False)
self.head_msg(d.idx, h.fn)
outputs_file = Path(self.uargs.spec)
m = MoneroWalletOutputsFile.Unsigned(parent=self, fn=outputs_file)

View file

@ -23,7 +23,8 @@ class OpSign(OpWallet):
async def process_wallet(self, d, fn, last):
h = MoneroWalletRPC(self, d)
h.open_wallet(refresh=False)
if self.need_daemon_start or len(self.kal.data) != 1:
h.open_wallet(refresh=False)
self.head_msg(d.idx, h.fn)
tx = self.get_tx_cls('Unsigned')(self.cfg, Path(self.uargs.spec))
res = self.c.call(