fix pk read issue
This commit is contained in:
@ -1160,7 +1160,8 @@ async def subscribe_to_wallet():
|
||||
pk = os.getenv("PK")
|
||||
if not pk:
|
||||
try:
|
||||
with open('./crypto/sol/secret.pk', 'r') as f:
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
with open(os.path.join(script_dir, 'secret.pk'), 'r') as f:
|
||||
pk = f.read().strip()
|
||||
if pk:
|
||||
logging.info("Private key loaded successfully from file.")
|
||||
|
Reference in New Issue
Block a user