Skip to content

Commit

Permalink
Handling of recreated invoices paid with other crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
yukonet committed Oct 3, 2024
1 parent 0634ae7 commit bd5eac6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions shkeeper/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def walletnotify(crypto_name, txid):
app.logger.warning(f"[{crypto.crypto}/{txid}] TX already exist in db")
return {"status": "success"}
except NotRelatedToAnyInvoice:
app.logger.warning(f"Transaction {txid} is not related to any invoice")
return {
"status": "success",
"message": "Transaction is not related to any invoice",
Expand Down
4 changes: 1 addition & 3 deletions shkeeper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,7 @@ def add_outgoing(cls, crypto, txid):

@classmethod
def add(cls, crypto, tx):
invoice_address = InvoiceAddress.query.filter_by(
crypto=crypto.crypto, addr=tx["addr"]
).first()
invoice_address = InvoiceAddress.query.filter_by(addr=tx["addr"]).first()

if not invoice_address:
# Check address in Invoice table in case the instance was upgraded from older version that does not have InvoiceAddress table
Expand Down

0 comments on commit bd5eac6

Please # to comment.