Fixed unique LNURLw for print
This commit is contained in:
parent
2ddc23de04
commit
c73fbe1b27
2 changed files with 3 additions and 6 deletions
|
|
@ -92,10 +92,7 @@ def get_withdraw_links(wallet_ids: Union[str, List[str]]) -> List[WithdrawLink]:
|
|||
q = ",".join(["?"] * len(wallet_ids))
|
||||
rows = db.fetchall(f"SELECT * FROM withdraw_links WHERE wallet IN ({q})", (*wallet_ids,))
|
||||
|
||||
links = []
|
||||
for x in rows:
|
||||
links.append(WithdrawLink.from_row(row) for row in rows)
|
||||
return links
|
||||
return [WithdrawLink.from_row(row) for row in rows]
|
||||
|
||||
|
||||
def update_withdraw_link(link_id: str, **kwargs) -> Optional[WithdrawLink]:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ def api_links():
|
|||
wallet_ids = get_user(g.wallet.user).wallet_ids
|
||||
try:
|
||||
return (
|
||||
jsonify([{**link._asdict(), **{"lnurl": link.lnurl}} for link in get_withdraw_links(wallet_ids)[0]]),
|
||||
jsonify([{**link._asdict(), **{"lnurl": link.lnurl}} for link in get_withdraw_links(wallet_ids)]),
|
||||
HTTPStatus.OK,
|
||||
)
|
||||
except LnurlInvalidUrl:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue