btcpay working! added bitpay client code to source tree to fix a bug

fixed a stripe race condition

added account balance warning to account balance page
This commit is contained in:
2020-05-15 18:18:19 -05:00
parent 67120e9461
commit e9dcf80f6c
17 changed files with 438 additions and 139 deletions

View File

@ -203,8 +203,11 @@ class DBModel:
def get_unresolved_btcpay_invoices(self):
self.cursor.execute("SELECT id, payments.created, email FROM unresolved_btcpay_invoices JOIN payments on payment_id = payment.id")
return list(map(lambda row: dict(id=row[0], created=row[1], email=row[2]), self.cursor.fetchall()))
self.cursor.execute("""
SELECT unresolved_btcpay_invoices.id, payments.created, payments.dollars, unresolved_btcpay_invoices.email
FROM unresolved_btcpay_invoices JOIN payments on payment_id = payments.id
""")
return list(map(lambda row: dict(id=row[0], created=row[1], dollars=row[2], email=row[3]), self.cursor.fetchall()))
def get_account_balance_warning(self, email):
self.cursor.execute("SELECT account_balance_warning FROM accounts WHERE email = %s", (email,))
@ -216,7 +219,7 @@ class DBModel:
def all_accounts(self):
self.cursor.execute("SELECT email, account_balance_warning FROM accounts")
return list(map(lambda row: dict(row=row[0], account_balance_warning=row[1]), self.cursor.fetchall()))
return list(map(lambda row: dict(email=row[0], account_balance_warning=row[1]), self.cursor.fetchall()))