From e4078504bac93f8e1e88eb7fb1f38ef1a03f2640 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Mon, 11 Jul 2022 15:03:19 +0300 Subject: [PATCH] fix: do not update charge if balance has not changed --- lnbits/extensions/satspay/crud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnbits/extensions/satspay/crud.py b/lnbits/extensions/satspay/crud.py index be681dc2..dfc5c47a 100644 --- a/lnbits/extensions/satspay/crud.py +++ b/lnbits/extensions/satspay/crud.py @@ -111,7 +111,7 @@ async def check_address_balance(charge_id: str) -> List[Charges]: + charge.onchainaddress ) respAmount = r.json()["chain_stats"]["funded_txo_sum"] - if respAmount >= charge.balance: + if respAmount > charge.balance: await update_charge(charge_id=charge_id, balance=respAmount) except Exception: pass