Skip to content
This repository was archived by the owner on Mar 8, 2025. It is now read-only.

Commit

Permalink
Don't require secrets file in dev/test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz committed Oct 3, 2023
1 parent c2c4098 commit ee30598
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ LOG_LEVEL=DEBUG
FLASK_DEBUG=1
DEBUG=1
MOCK_BTC=1
MOCK_LNDHUB=1
MOCK_S3=1
MOCK_MAIL=1
MOCK_NOSTR=1
Expand Down
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ LOG_LEVEL=DEBUG
FLASK_DEBUG=1
DEBUG=1
MOCK_BTC=1
MOCK_LNDHUB=1
MOCK_S3=1
MOCK_MAIL=1
MOCK_NOSTR=1
Expand Down
3 changes: 2 additions & 1 deletion api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
LNDHUB_USER = os.environ.get('LNDHUB_USER')
LNDHUB_PASSWORD = os.environ.get('LNDHUB_PASSWORD')

if LNDHUB_USER is None or LNDHUB_PASSWORD is None:
MOCK_LNDHUB = bool(int(os.environ.get('MOCK_LNDHUB', 0)))
if not MOCK_LNDHUB:
with open("/secrets/lndhub.json") as f:
db = json.load(f)
if LNDHUB_USER is None:
Expand Down

0 comments on commit ee30598

Please sign in to comment.