mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 06:48:02 +01:00
resolving conflict errors
This commit is contained in:
parent
11b743a905
commit
fd7a5ca465
3 changed files with 8 additions and 16 deletions
|
@ -27,6 +27,9 @@ async def create_charge(user: str, data: CreateCharge) -> Charges:
|
|||
onchainaddress = onchain.address
|
||||
else:
|
||||
onchainaddress = None
|
||||
data.extra = json.dumps(
|
||||
{"mempool_endpoint": "https://mempool.space", "network": "Mainnet"}
|
||||
)
|
||||
if data.lnbitswallet:
|
||||
payment_hash, payment_request = await create_invoice(
|
||||
wallet_id=data.lnbitswallet,
|
||||
|
|
|
@ -308,17 +308,6 @@
|
|||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %} % block styles %}
|
||||
<link
|
||||
href="/satspay/css/{{ charge_data.custom_css }}"
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
/>
|
||||
<style>
|
||||
header button.q-btn-dropdown {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %} {% block scripts %}
|
||||
|
||||
<script src="https://mempool.space/mempool.js"></script>
|
||||
|
@ -478,7 +467,7 @@
|
|||
if (this.charge.custom_css) {
|
||||
document.body.setAttribute('data-theme', '')
|
||||
}
|
||||
if (this.charge.lnbitswallet) this.payInvoice()
|
||||
if (this.charge.payment_request) this.payInvoice()
|
||||
else this.payOnchain()
|
||||
|
||||
await this.checkBalances()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from http import HTTPStatus
|
||||
|
||||
import json
|
||||
from fastapi import Response
|
||||
from fastapi.param_functions import Depends
|
||||
from fastapi.templating import Jinja2Templates
|
||||
|
@ -36,15 +36,15 @@ async def display(request: Request, charge_id: str):
|
|||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Charge link does not exist."
|
||||
)
|
||||
logger.debug(charge)
|
||||
extra = json.loads(charge.extra)
|
||||
|
||||
return satspay_renderer().TemplateResponse(
|
||||
"satspay/display.html",
|
||||
{
|
||||
"request": request,
|
||||
"charge_data": public_charge(charge),
|
||||
"mempool_endpoint": charge.extra.mempool_endpoint,
|
||||
"network": charge.extra.network,
|
||||
"mempool_endpoint": extra["mempool_endpoint"],
|
||||
"network": extra["network"],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue