Skip to content

Commit 7418401

Browse files
alexcos20calina-c
andauthored
add chainId to compute requests (#406)
* add chainId to compute requests * Bump version: 1.0.0 → 1.0.1 Co-authored-by: Calina Cenan <calina@cenan.net>
1 parent 71e9ea6 commit 7418401

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.0
2+
current_version = 1.0.1
33
commit = True
44
tag = True
55

ocean_provider/routes/compute.py

+2
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,15 @@ def computeResult():
379379
nonce, provider_signature = sign_for_compute(
380380
provider_wallet, consumer_address, job_id
381381
)
382+
web3 = get_web3()
382383
params = {
383384
"index": data.get("index"),
384385
"owner": data.get("consumerAddress"),
385386
"jobId": job_id,
386387
"consumerSignature": data.get("signature"),
387388
"providerSignature": provider_signature,
388389
"nonce": nonce,
390+
"chainId": web3.chain_id,
389391
}
390392
req = PreparedRequest()
391393
req.prepare_url(url, params)

ocean_provider/utils/util.py

+2
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ def process_compute_request(data):
266266
nonce, provider_signature = sign_for_compute(provider_wallet, owner, job_id)
267267
body["providerSignature"] = provider_signature
268268
body["nonce"] = nonce
269+
web3 = get_web3()
270+
body["chainId"] = web3.chain_id
269271

270272
return body
271273

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
url="https://github.com/oceanprotocol/provider-py",
105105
# fmt: off
106106
# bumpversion needs single quotes
107-
version='1.0.0',
107+
version='1.0.1',
108108
# fmt: on
109109
zip_safe=False,
110110
)

0 commit comments

Comments
 (0)