mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
Mint: watchdog balance log and killswitch (#705)
* wip store balance * store balances in watchdog worker * move mint_auth_database setting * auth db * balances returned as Amount (instead of int) * add test for balance change on invoice receive * fix 1 test * cancel tasks on shutdown * watchdog can now abort * remove wallet api server * fix lndgrpc * fix lnbits balance * disable watchdog * balance lnbits msat * test db watcher with its own database connection * init superclass only once * wip: log balance in keysets table * check max balance using new keyset balance * fix test * fix another test * store fees in keysets * format * cleanup * shorter * add keyset migration to auth server * fix fakewallet * fix db tests * fix postgres problems during migration 26 (mint) * fix cln * ledger * working with pending * super fast watchdog, errors * test new pipeline * delete walletapi * delete unneeded files * revert workflows
This commit is contained in:
@@ -90,7 +90,7 @@ class BlinkWallet(LightningBackend):
|
||||
logger.error(f"Blink API error: {exc}")
|
||||
return StatusResponse(
|
||||
error_message=f"Failed to connect to {self.endpoint} due to: {exc}",
|
||||
balance=0,
|
||||
balance=Amount(self.unit, 0),
|
||||
)
|
||||
|
||||
try:
|
||||
@@ -100,7 +100,7 @@ class BlinkWallet(LightningBackend):
|
||||
error_message=(
|
||||
f"Received invalid response from {self.endpoint}: {r.text}"
|
||||
),
|
||||
balance=0,
|
||||
balance=Amount(self.unit, 0),
|
||||
)
|
||||
|
||||
balance = 0
|
||||
@@ -113,7 +113,7 @@ class BlinkWallet(LightningBackend):
|
||||
self.wallet_ids[Unit.sat] = wallet_dict["id"] # type: ignore
|
||||
balance = wallet_dict["balance"] # type: ignore
|
||||
|
||||
return StatusResponse(error_message=None, balance=balance)
|
||||
return StatusResponse(error_message=None, balance=Amount(self.unit, balance))
|
||||
|
||||
async def create_invoice(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user