mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 03:46:17 +02:00
more info on confirmation code screen.
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import json
|
import json
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from quart import url_for
|
from quart import url_for
|
||||||
from typing import NamedTuple, Optional, List
|
from typing import NamedTuple, Optional, List, Dict
|
||||||
from lnurl import encode as lnurl_encode # type: ignore
|
from lnurl import encode as lnurl_encode # type: ignore
|
||||||
from lnurl.types import LnurlPayMetadata # type: ignore
|
from lnurl.types import LnurlPayMetadata # type: ignore
|
||||||
from lnurl.models import LnurlPaySuccessAction, UrlAction # type: ignore
|
from lnurl.models import LnurlPaySuccessAction, UrlAction # type: ignore
|
||||||
|
|
||||||
shop_counters = {}
|
shop_counters: Dict = {}
|
||||||
|
|
||||||
|
|
||||||
class ShopCounter(object):
|
class ShopCounter(object):
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import time
|
import time
|
||||||
|
from datetime import datetime
|
||||||
from quart import g, render_template, request
|
from quart import g, render_template, request
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
|
||||||
@@ -48,4 +49,12 @@ async def confirmation_code():
|
|||||||
item = await get_item(payment.extra.get("item"))
|
item = await get_item(payment.extra.get("item"))
|
||||||
shop = await get_shop(item.shop)
|
shop = await get_shop(item.shop)
|
||||||
|
|
||||||
return shop.get_word(payment_hash) + style
|
return (
|
||||||
|
f"""
|
||||||
|
[{shop.get_word(payment_hash)}]
|
||||||
|
{item.name}
|
||||||
|
{item.price} {item.unit}
|
||||||
|
{datetime.utcfromtimestamp(payment.time).strftime('%Y-%m-%d %H:%M:%S')}
|
||||||
|
"""
|
||||||
|
+ style
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user