Order withdraw links by open_time. New first (#8)

This commit is contained in:
supiiik 2023-09-24 20:15:27 +02:00 committed by GitHub
commit 8cd549042d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ async def get_withdraw_links(wallet_ids: Union[str, List[str]]) -> List[Withdraw
q = ",".join(["?"] * len(wallet_ids))
rows = await db.fetchall(
f"SELECT * FROM withdraw.withdraw_link WHERE wallet IN ({q})", (*wallet_ids,)
f"SELECT * FROM withdraw.withdraw_link WHERE wallet IN ({q}) ORDER BY open_time DESC", (*wallet_ids,)
)
return [WithdrawLink(**row) for row in rows]