Skip to content

Instantly share code, notes, and snippets.

View Maxwell012's full-sized avatar
💭
I may be slow to respond.

Kurbanov Davyd Maxwell012

💭
I may be slow to respond.
View GitHub Profile
@Maxwell012
Maxwell012 / transfer method
Created September 26, 2024 19:45
Third method that located in WalletService class
async def transfer(
self,
uow: UnitOfWork,
from_user_h_id: int,
to_user_h_id: int,
sender_amount: amount_decimal(gt=0),
recipient_amount: amount_decimal(gt=0),
payment_system_h_id: int
) -> Optional[int]:
from_user_h = await Handlers.user_history.get_one(uow, id=from_user_h_id)
@Maxwell012
Maxwell012 / _done method
Created September 26, 2024 19:44
Second method
async def _done(
self,
uow: UnitOfWork,
current_order: OrderSchemaFromDB,
update_order: OrderSchemaUpdateForSeller
):
"""
- create a transaction
- increase daily volume for seller and buyer
- update order
@Maxwell012
Maxwell012 / edit_for_seller method
Created September 26, 2024 19:41
First method that contatin high level logic for editing an order for a seller
async def edit_for_seller(
self,
uow: UnitOfWork,
current_order: OrderSchemaFromDB,
update_order: OrderSchemaUpdateForSeller
) -> None:
async with self.lock.lock("order", str(current_order.id)):
message = None
if current_order.status == OrderStatusSchema.TRANSFERRING:
if update_order.status == OrderStatusSchema.DONE:
@Maxwell012
Maxwell012 / windows-keys.md
Created September 24, 2024 16:28 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index