Signable.xmr_wallet_outputs_file.unsigned: reimplement as one-liner

This commit is contained in:
The MMGen Project 2024-04-06 07:05:21 +00:00
commit feb2706fba
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2

View file

@ -273,13 +273,9 @@ class Signable:
@property
def unsigned(self):
import json
unsigned = super().unsigned
def gen():
for f in unsigned:
with open(f) as fh:
if not json.load(fh)['MoneroMMGenWalletOutputsFile']['data']['imported']:
yield f
return tuple(gen())
return tuple(
f for f in super().unsigned
if not json.loads(f.read_text())['MoneroMMGenWalletOutputsFile']['data']['imported'])
async def sign(self,f):
from .xmrwallet import MoneroWalletOps,xmrwallet_uargs