more info on confirmation code screen.

This commit is contained in:
fiatjaf
2021-03-14 13:01:19 -03:00
parent 4c8ce1bfed
commit d9b9d1e9b2
2 changed files with 12 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
import json
from collections import OrderedDict
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.types import LnurlPayMetadata # type: ignore
from lnurl.models import LnurlPaySuccessAction, UrlAction # type: ignore
shop_counters = {}
shop_counters: Dict = {}
class ShopCounter(object):

View File

@@ -1,4 +1,5 @@
import time
from datetime import datetime
from quart import g, render_template, request
from http import HTTPStatus
@@ -48,4 +49,12 @@ async def confirmation_code():
item = await get_item(payment.extra.get("item"))
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
)