mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-21 19:14:19 +01:00
Mint: Fakewallet support for USD (#488)
* fakewallet usd wip * FakeWallet support for USD * fix api return for receive * use MINT_BACKEND_BOLT11_SAT everywhere
This commit is contained in:
@@ -62,12 +62,17 @@ class PaymentStatus(BaseModel):
|
||||
|
||||
|
||||
class LightningBackend(ABC):
|
||||
units: set[Unit]
|
||||
supported_units: set[Unit]
|
||||
unit: Unit
|
||||
|
||||
def assert_unit_supported(self, unit: Unit):
|
||||
if unit not in self.units:
|
||||
if unit not in self.supported_units:
|
||||
raise Unsupported(f"Unit {unit} is not supported")
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self, unit: Unit, **kwargs):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def status(self) -> Coroutine[None, None, StatusResponse]:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user