mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-27 04:16:18 +02:00
Deleted some prints
This commit is contained in:
@@ -9,7 +9,7 @@ from lnbits.helpers import urlsafe_short_hash
|
|||||||
from quart import jsonify
|
from quart import jsonify
|
||||||
import httpx
|
import httpx
|
||||||
from lnbits.core.services import create_invoice, check_invoice_status
|
from lnbits.core.services import create_invoice, check_invoice_status
|
||||||
from ..watchonly.crud import get_watch_wallet, get_derive_address, get_mempool, update_watch_wallet
|
from ..watchonly.crud import get_watch_wallet, get_fresh_address, get_mempool
|
||||||
|
|
||||||
|
|
||||||
###############CHARGES##########################
|
###############CHARGES##########################
|
||||||
@@ -19,10 +19,9 @@ async def create_charge(user: str, description: str = None, onchainwallet: Optio
|
|||||||
charge_id = urlsafe_short_hash()
|
charge_id = urlsafe_short_hash()
|
||||||
if onchainwallet:
|
if onchainwallet:
|
||||||
wallet = await get_watch_wallet(onchainwallet)
|
wallet = await get_watch_wallet(onchainwallet)
|
||||||
onchainaddress = await get_derive_address(onchainwallet, int(wallet[4]) + 1)
|
onchainaddress = await get_fresh_address(onchainwallet)
|
||||||
await update_watch_wallet(wallet_id=onchainwallet, address_no=int(wallet[4]) + 1)
|
|
||||||
else:
|
else:
|
||||||
onchainaddress = None
|
onchainaddress.address = None
|
||||||
if lnbitswallet:
|
if lnbitswallet:
|
||||||
payment_hash, payment_request = await create_invoice(
|
payment_hash, payment_request = await create_invoice(
|
||||||
wallet_id=lnbitswallet,
|
wallet_id=lnbitswallet,
|
||||||
@@ -51,7 +50,7 @@ async def create_charge(user: str, description: str = None, onchainwallet: Optio
|
|||||||
)
|
)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
""",
|
""",
|
||||||
(charge_id, user, description, onchainwallet, onchainaddress, lnbitswallet,
|
(charge_id, user, description, onchainwallet, onchainaddress.address, lnbitswallet,
|
||||||
payment_request, payment_hash, webhook, completelink, completelinktext, time, amount, 0),
|
payment_request, payment_hash, webhook, completelink, completelinktext, time, amount, 0),
|
||||||
)
|
)
|
||||||
return await get_charge(charge_id)
|
return await get_charge(charge_id)
|
||||||
|
@@ -190,7 +190,6 @@
|
|||||||
if (self.charge_balance >= self.charge_amount ){
|
if (self.charge_balance >= self.charge_amount ){
|
||||||
self.charge_paid = "True"
|
self.charge_paid = "True"
|
||||||
}
|
}
|
||||||
console.log(self.charge_paid)
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
@@ -241,7 +240,6 @@
|
|||||||
this.getTheTime()
|
this.getTheTime()
|
||||||
this.getThePercentage()
|
this.getThePercentage()
|
||||||
var timerCount = this.timerCount
|
var timerCount = this.timerCount
|
||||||
console.log('{{ charge.paid }}')
|
|
||||||
if('{{ charge.paid }}' == 'False'){
|
if('{{ charge.paid }}' == 'False'){
|
||||||
timerCount()
|
timerCount()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user