Skip to content

Commit

Permalink
backend check
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Jun 26, 2024
1 parent bd5dc05 commit 772fb26
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cashu/lightning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
from .lndrest import LndRestWallet # noqa: F401
from .strike import StrikeWallet # noqa: F401

if settings.mint_backend_bolt11_sat is None or settings.mint_backend_bolt11_usd is None:
raise Exception("MINT_BACKEND_BOLT11_SAT or MINT_BACKEND_BOLT11_USD not set")
backend_settings = [
settings.mint_backend_bolt11_sat,
settings.mint_backend_bolt11_usd,
settings.mint_backend_bolt11_eur,
]
if all([s is None for s in backend_settings]):
raise Exception(
"MINT_BACKEND_BOLT11_SAT or MINT_BACKEND_BOLT11_USD or MINT_BACKEND_BOLT11_EUR not set"
)

0 comments on commit 772fb26

Please sign in to comment.