refactor: ignore public key argument in dc_preconfigure_keypair()

Public key can be extracted from the secret key file.
This commit is contained in:
link2xt
2023-09-12 01:03:33 +00:00
parent ef4d2a7ed0
commit 532e9cb09a
5 changed files with 10 additions and 12 deletions

View File

@@ -478,10 +478,9 @@ class ACFactory:
except IndexError:
pass
else:
fname_pub = self.data.read_path(f"key/{keyname}-public.asc")
fname_sec = self.data.read_path(f"key/{keyname}-secret.asc")
if fname_pub and fname_sec:
account._preconfigure_keypair(addr, fname_pub, fname_sec)
if fname_sec:
account._preconfigure_keypair(addr, fname_sec)
return True
print(f"WARN: could not use preconfigured keys for {addr!r}")