fix: do not update charge if balance has not changed

This commit is contained in:
Vlad Stan 2022-07-11 15:03:19 +03:00
parent 25f37b0e4f
commit e4078504ba

View file

@ -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