forked from BoltzExchange/boltz-web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.py
More file actions
executable file
·38 lines (28 loc) · 1001 Bytes
/
Copy pathbuild.py
File metadata and controls
executable file
·38 lines (28 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python3
import sys
def handle_coop_disabled():
print("Cooperative signatures are disabled in config")
sys.exit(1)
network: str | None = None
with open("./src/config.ts", "r") as f:
for line in f:
if "cooperativeDisabled" in line:
if "false" not in line:
handle_coop_disabled()
if "network:" in line and '"' in line:
network = line.split(":")[1].strip().strip('"').strip('",')
# .env file is not required on regtest
if network != "regtest":
try:
with open(".env", "r") as f:
data = f.read()
for var in [
"VITE_RSK_LOG_SCAN_ENDPOINT",
"VITE_RSK_FALLBACK_ENDPOINT",
"VITE_WALLETCONNECT_PROJECT_ID",
"VITE_CHATWOOT_TOKEN",
]:
if var not in data:
print(f"WARN: {var} not in .env file")
except Exception as e:
print("WARN: could not open .env file:", e)