We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9846c73 commit cfc85fcCopy full SHA for cfc85fc
mytoncore.py
@@ -1445,7 +1445,11 @@ def send_boc_toncenter(self, file_path: str):
1445
boc = f.read()
1446
boc_b64 = base64.b64encode(boc).decode("utf-8")
1447
data = {"boc": boc_b64}
1448
- result = requests.post(url='https://toncenter.com/api/v2/sendBoc', json=data)
+ if self.GetNetworkName() == 'testnet':
1449
+ url = 'https://testnet.toncenter.com/api/v2/sendBoc'
1450
+ else:
1451
+ url = 'https://toncenter.com/api/v2/sendBoc'
1452
+ result = requests.post(url=url, json=data)
1453
if result.status_code != 200:
1454
local.add_log(f'Failed to send boc to toncenter: {result.content}', 'info')
1455
return False
0 commit comments