more info on confirmation code screen.
This commit is contained in:
parent
4c8ce1bfed
commit
d9b9d1e9b2
2 changed files with 12 additions and 3 deletions
|
|
@ -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
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue