{% raw %}{{ famount }}{% endraw %}
- {% raw %}{{ fsat }}{% endraw %} sat
+ {% raw %}{{ fsat }}
+ sat
+ ( + {{ tipAmountSat }} tip)
+ {% endraw %}
@@ -310,7 +313,6 @@
return Math.ceil((this.tipAmount / this.exchangeRate) * 100000000)
},
fsat: function () {
- console.log('sat', this.sat, LNbits.utils.formatSat(this.sat))
return LNbits.utils.formatSat(this.sat)
}
},
@@ -362,7 +364,6 @@
showInvoice: function () {
var self = this
var dialog = this.invoiceDialog
- console.log(this.sat, this.tposId)
axios
.post('/tpos/api/v1/tposs/' + this.tposId + '/invoices', null, {
params: {
diff --git a/lnbits/extensions/tpos/views_api.py b/lnbits/extensions/tpos/views_api.py
index 9567f98a6..9609956ec 100644
--- a/lnbits/extensions/tpos/views_api.py
+++ b/lnbits/extensions/tpos/views_api.py
@@ -17,7 +17,7 @@ from .models import CreateTposData
@tpos_ext.get("/api/v1/tposs", status_code=HTTPStatus.OK)
async def api_tposs(
- all_wallets: bool = Query(None), wallet: WalletTypeInfo = Depends(get_key_type)
+ all_wallets: bool = Query(False), wallet: WalletTypeInfo = Depends(get_key_type)
):
wallet_ids = [wallet.wallet.id]
if all_wallets:
@@ -63,6 +63,9 @@ async def api_tpos_create_invoice(
status_code=HTTPStatus.NOT_FOUND, detail="TPoS does not exist."
)
+ if tipAmount:
+ amount += tipAmount
+
try:
payment_hash, payment_request = await create_invoice(
wallet_id=tpos.wallet,