mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 04:46:18 +02:00
fix: do not update charge if balance has not changed
This commit is contained in:
@@ -111,7 +111,7 @@ async def check_address_balance(charge_id: str) -> List[Charges]:
|
|||||||
+ charge.onchainaddress
|
+ charge.onchainaddress
|
||||||
)
|
)
|
||||||
respAmount = r.json()["chain_stats"]["funded_txo_sum"]
|
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)
|
await update_charge(charge_id=charge_id, balance=respAmount)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
Reference in New Issue
Block a user