formatting
This commit is contained in:
parent
31fe5a5141
commit
9fb63f268f
1 changed files with 7 additions and 3 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
import shortuuid
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List, Optional, Union
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
|
import shortuuid
|
||||||
|
|
||||||
from lnbits.helpers import urlsafe_short_hash
|
from lnbits.helpers import urlsafe_short_hash
|
||||||
|
|
||||||
from . import db
|
from . import db
|
||||||
|
|
@ -98,7 +98,11 @@ async def get_withdraw_links(wallet_ids: Union[str, List[str]]) -> List[Withdraw
|
||||||
|
|
||||||
|
|
||||||
async def remove_unique_withdraw_link(link: WithdrawLink, unique_hash: str) -> None:
|
async def remove_unique_withdraw_link(link: WithdrawLink, unique_hash: str) -> None:
|
||||||
unique_links = [x.strip() for x in link.usescsv.split(",") if unique_hash != shortuuid.uuid(name=link.id + link.unique_hash + x.strip())]
|
unique_links = [
|
||||||
|
x.strip()
|
||||||
|
for x in link.usescsv.split(",")
|
||||||
|
if unique_hash != shortuuid.uuid(name=link.id + link.unique_hash + x.strip())
|
||||||
|
]
|
||||||
await update_withdraw_link(
|
await update_withdraw_link(
|
||||||
link.id,
|
link.id,
|
||||||
usescsv=",".join(unique_links),
|
usescsv=",".join(unique_links),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue