yeref 0.24.11__tar.gz → 0.24.13__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.11
3
+ Version: 0.24.13
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.24.11',
5
+ version='0.24.13',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -8432,27 +8432,26 @@ async def calculate_wallet_address(owner, master, KEYS_JSON, is_test_only=False)
8432
8432
  items = []
8433
8433
  for provider, keys in data["ton"].items(): # provider = "tonapi" или "toncenter"
8434
8434
  for it in keys: # it = {"all": "..."} или {"testnet": "..."}
8435
- if provider == "tonapi":
8436
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8437
- if key:
8438
- items.append([
8439
- 'tonapi',
8440
- f'https://{pfx_testnet}tonapi.io/v2/accounts/{owner}/jettons/{master}',
8441
- {
8442
- 'accept': 'application/json',
8443
- 'Authorization': f'Bearer {key}'
8444
- }
8445
- ])
8435
+ if provider == "tonapi": continue
8436
+ # key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('all')
8437
+ # if key:
8438
+ # items.append([
8439
+ # 'tonapi',
8440
+ # f'https://{pfx_testnet}tonapi.io/v2/accounts/{owner}/jettons/{master}',
8441
+ # {
8442
+ # 'accept': 'application/json',
8443
+ # 'Authorization': f'Bearer {key}'
8444
+ # }
8445
+ # ])
8446
8446
  elif provider == "toncenter":
8447
- key = it.get('testnet') if is_test_only and 'testnet' in it else it.get('mainnet')
8447
+ key = next((it['testnet'] if is_test_only else it['mainnet']) for it in keys if
8448
+ (is_test_only and 'testnet' in it) or (not is_test_only and 'mainnet' in it)), None)
8449
+ print(f"{key=}")
8448
8450
  if key:
8449
8451
  items.append([
8450
8452
  'toncenter',
8451
8453
  f'https://{pfx_testnet}toncenter.com/api/v3/jetton/wallets?owner_address={owner}&jetton_address={master}&limit=1&offset=0',
8452
- {
8453
- 'accept': 'application/json',
8454
- 'X-API-Key': key
8455
- }
8454
+ {'accept': 'application/json', 'X-API-Key': key}
8456
8455
  ])
8457
8456
 
8458
8457
  while True:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.24.11
3
+ Version: 0.24.13
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes
File without changes