feat: add MINT_URL env var for 3rd party mints

This commit is contained in:
Vlad Stan
2022-10-07 21:53:04 +03:00
parent 01b201d245
commit 64028d559f
2 changed files with 7 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ CASHU_DIR=~/.cashu
# WALLET
# MINT_URL=http://localhost:8000/cashu/api/v1/cashu/SUVB2UrJSd9LKmn6aoSpVq
MINT_HOST=127.0.0.1
MINT_PORT=3338

View File

@@ -34,13 +34,15 @@ MINT_PRIVATE_KEY = env.str("MINT_PRIVATE_KEY", default=None)
MINT_SERVER_HOST = env.str("MINT_SERVER_HOST", default="127.0.0.1")
MINT_SERVER_PORT = env.int("MINT_SERVER_PORT", default=3338)
MINT_URL = env.str("MINT_URL")
MINT_HOST = env.str("MINT_HOST", default="8333.space")
MINT_PORT = env.int("MINT_PORT", default=3338)
if MINT_HOST in ["localhost", "127.0.0.1"]:
MINT_URL = f"http://{MINT_HOST}:{MINT_PORT}"
else:
MINT_URL = f"https://{MINT_HOST}:{MINT_PORT}"
if not MINT_URL:
if MINT_HOST in ["localhost", "127.0.0.1"]:
MINT_URL = f"http://{MINT_HOST}:{MINT_PORT}"
else:
MINT_URL = f"https://{MINT_HOST}:{MINT_PORT}"
LNBITS_ENDPOINT = env.str("LNBITS_ENDPOINT", default=None)
LNBITS_KEY = env.str("LNBITS_KEY", default=None)