xync-schema 0.6.73.dev13__tar.gz → 0.6.73.dev15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xync_schema-0.6.73.dev13/xync_schema.egg-info → xync_schema-0.6.73.dev15}/PKG-INFO +1 -1
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema/enums.py +6 -6
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema/models.py +3 -10
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema/types.py +0 -16
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15/xync_schema.egg-info}/PKG-INFO +1 -1
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/.env.sample +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/.gitignore +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/.pre-commit-config.yaml +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/README.md +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/makefile +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/pyproject.toml +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/setup.cfg +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/tests/__init__.py +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/tests/test_db.py +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema/__init__.py +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema.egg-info/SOURCES.txt +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema.egg-info/dependency_links.txt +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema.egg-info/requires.txt +0 -0
- {xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema.egg-info/top_level.txt +0 -0
|
@@ -164,7 +164,7 @@ class ExAction(IntEnum):
|
|
|
164
164
|
exs = {
|
|
165
165
|
"Beribit": (
|
|
166
166
|
ExType.p2p,
|
|
167
|
-
"
|
|
167
|
+
"AgACAgIAAxkBAAIEY2ferEZ38wZbpG9kmfFPjsSGC3CmAAIo8DEbF_j4StC_ac-XA5fbAQADAgADeAADNgQ",
|
|
168
168
|
"beribit.app",
|
|
169
169
|
"beribit.app",
|
|
170
170
|
"beribit.app/login",
|
|
@@ -172,7 +172,7 @@ exs = {
|
|
|
172
172
|
),
|
|
173
173
|
"Binance": (
|
|
174
174
|
ExType.main,
|
|
175
|
-
"
|
|
175
|
+
"AgACAgIAAxkBAAIEYGfeq1hpcgu2el0ROqFvWtWNHrtWAAIQ8DEbF_j4Sq7oecXCtoONAQADAgADbQADNgQ",
|
|
176
176
|
"binance.com",
|
|
177
177
|
"p2p.binance.com",
|
|
178
178
|
"accounts.binance.com/login",
|
|
@@ -180,7 +180,7 @@ exs = {
|
|
|
180
180
|
),
|
|
181
181
|
"BingX": (
|
|
182
182
|
ExType.p2p,
|
|
183
|
-
"
|
|
183
|
+
"AgACAgIAAxkBAAIEZWferWiY5ZCV2SAWgSnUan76cl-TAAIy8DEbF_j4Sq1aMXmyATzQAQADAgADbQADNgQ",
|
|
184
184
|
"bingx.com",
|
|
185
185
|
"api-app.we-api.com",
|
|
186
186
|
"bingx.com/login",
|
|
@@ -190,7 +190,7 @@ exs = {
|
|
|
190
190
|
"BitcoinGlobal": (ExType.p2p, "", "", "", "", ExStatus.plan),
|
|
191
191
|
"BitGet": (
|
|
192
192
|
ExType.p2p,
|
|
193
|
-
"
|
|
193
|
+
"AgACAgIAAxkBAAIEZ2ferYwPfGrx1PX-C7SBToZG-h-iAAI08DEbF_j4StxKwJlnBT3XAQADAgADbQADNgQ",
|
|
194
194
|
"www.bitget.com",
|
|
195
195
|
"www.bitget.com",
|
|
196
196
|
"www.bitget.com/login",
|
|
@@ -198,7 +198,7 @@ exs = {
|
|
|
198
198
|
),
|
|
199
199
|
"BitPapa": (
|
|
200
200
|
ExType.p2p,
|
|
201
|
-
"",
|
|
201
|
+
"AgACAgIAAxkBAAIEaWferbY69OMAASKXObrcYYLciuWVswACPPAxGxf4-EqNHJqqRTQmMgEAAwIAA3kAAzYE",
|
|
202
202
|
"bitpapa.com",
|
|
203
203
|
"bitpapa.com",
|
|
204
204
|
"bitpapa.com/log-in",
|
|
@@ -291,7 +291,7 @@ exs = {
|
|
|
291
291
|
"WazirX": (ExType.p2p, "", "", "", "", ExStatus.plan),
|
|
292
292
|
"WebMoney": (
|
|
293
293
|
ExType.p2p,
|
|
294
|
-
"",
|
|
294
|
+
"AgACAgIAAxkBAAIEb2ferkkq2wWB-aJwIY6I2VZxSK4CAAJM8DEbF_j4SlHZDVKCzkUxAQADAgADeQADNgQ",
|
|
295
295
|
"exchanger.money",
|
|
296
296
|
"exchanger.money",
|
|
297
297
|
"exchanger.money",
|
|
@@ -4,7 +4,6 @@ from datetime import datetime
|
|
|
4
4
|
from tortoise import fields
|
|
5
5
|
from tortoise.queryset import QuerySet
|
|
6
6
|
from tortoise import Model as BaseModel
|
|
7
|
-
from tortoise.signals import pre_save
|
|
8
7
|
from x_auth.models import Model, UserTg
|
|
9
8
|
from x_model.models import TsTrait, DatetimeSecField
|
|
10
9
|
|
|
@@ -204,12 +203,12 @@ class User(UserTg, TsTrait):
|
|
|
204
203
|
# investments: fields.BackwardFKRelation["Investment"]
|
|
205
204
|
|
|
206
205
|
async def free_assets(self):
|
|
207
|
-
assets = await Asset.filter(
|
|
206
|
+
assets = await Asset.filter(agent__actor__person__user__id=self.id).values("free", "coin__rate")
|
|
208
207
|
return sum(asset["free"] * asset["coin__rate"] for asset in assets)
|
|
209
208
|
|
|
210
209
|
async def fiats_sum(self):
|
|
211
|
-
fiats = await Fiat.filter(
|
|
212
|
-
return sum(fiat["amount"] * fiat["
|
|
210
|
+
fiats = await Fiat.filter(cred__person__user__id=self.id).values("amount", "cred__pmcur__cur__rate")
|
|
211
|
+
return sum(fiat["amount"] * fiat["cred__pmcur__cur__rate"] for fiat in fiats)
|
|
213
212
|
|
|
214
213
|
async def balance(self) -> float:
|
|
215
214
|
return await self.free_assets() + await self.fiats_sum()
|
|
@@ -223,12 +222,6 @@ class User(UserTg, TsTrait):
|
|
|
223
222
|
# computed = ["balance"]
|
|
224
223
|
|
|
225
224
|
|
|
226
|
-
@pre_save(User)
|
|
227
|
-
async def person(_meta, user: User, _db, _updated: dict) -> None:
|
|
228
|
-
if not user.person_id:
|
|
229
|
-
user.person = await Person.create(name=f"{user.first_name} {user.last_name}".strip())
|
|
230
|
-
|
|
231
|
-
|
|
232
225
|
class Forum(Model, TsTrait):
|
|
233
226
|
id: int = fields.BigIntField(True)
|
|
234
227
|
joined: bool = fields.BooleanField(default=False)
|
|
@@ -91,22 +91,6 @@ class BaseOrder(BaseModel):
|
|
|
91
91
|
id: int | None = None
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
class Order(BaseModel):
|
|
95
|
-
id: int
|
|
96
|
-
amount: float
|
|
97
|
-
status: str
|
|
98
|
-
cred: models.Cred.out_type()
|
|
99
|
-
is_sell: bool
|
|
100
|
-
created_at: datetime
|
|
101
|
-
topic: int
|
|
102
|
-
actions: dict | None = {}
|
|
103
|
-
actor: int | None = None
|
|
104
|
-
payed_at: datetime | None = None
|
|
105
|
-
appealed_at: datetime | None = None
|
|
106
|
-
confirmed_at: datetime | None = None
|
|
107
|
-
msgs: int = 0
|
|
108
|
-
|
|
109
|
-
|
|
110
94
|
class OrderIn(BaseModel):
|
|
111
95
|
exid: int
|
|
112
96
|
amount: float
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xync_schema-0.6.73.dev13 → xync_schema-0.6.73.dev15}/xync_schema.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|