From 9d1b4af4552806f564292fe8a2aaad3e3ec02cf3 Mon Sep 17 00:00:00 2001 From: minibits-cash Date: Fri, 10 May 2024 09:19:56 +0200 Subject: [PATCH] Enable bolt11 mint method for EUR --- cashu/core/settings.py | 1 + cashu/mint/startup.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cashu/core/settings.py b/cashu/core/settings.py index d010a76f..acce8cc1 100644 --- a/cashu/core/settings.py +++ b/cashu/core/settings.py @@ -64,6 +64,7 @@ class MintBackends(MintSettings): mint_lightning_backend: str = Field(default="") # deprecated mint_backend_bolt11_sat: str = Field(default="") mint_backend_bolt11_usd: str = Field(default="") + mint_backend_bolt11_eur: str = Field(default="") mint_lnbits_endpoint: str = Field(default=None) mint_lnbits_key: str = Field(default=None) diff --git a/cashu/mint/startup.py b/cashu/mint/startup.py index a158cabc..c58e1feb 100644 --- a/cashu/mint/startup.py +++ b/cashu/mint/startup.py @@ -51,6 +51,11 @@ unit=Unit.usd ) backends.setdefault(Method.bolt11, {})[Unit.usd] = backend_bolt11_usd +if settings.mint_backend_bolt11_eur: + backend_bolt11_eur = getattr(wallets_module, settings.mint_backend_bolt11_eur)( + unit=Unit.eur + ) + backends.setdefault(Method.bolt11, {})[Unit.eur] = backend_bolt11_eur if not backends: raise Exception("No backends are set.")