mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
update compute stop, document id is not needed, neither for operator service, neither used on signature check
This commit is contained in:
parent
7448a1246c
commit
5105a4fdad
@ -154,7 +154,7 @@ ___
|
||||
|
||||
### computeStop
|
||||
|
||||
▸ **computeStop**(`did`, `consumerAddress`, `jobId`, `providerUri`, `signer`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
|
||||
▸ **computeStop**(`did`, `consumerAddress`, `jobId`, `providerUri`, `signer`, `signal?`, `agreementId?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
|
||||
|
||||
Instruct the provider to Stop the execution of a to stop a compute job.
|
||||
|
||||
@ -168,6 +168,7 @@ Instruct the provider to Stop the execution of a to stop a compute job.
|
||||
| `providerUri` | `string` | The provider URI. |
|
||||
| `signer` | `Signer` | The consumer signer object. |
|
||||
| `signal?` | `AbortSignal` | abort signal |
|
||||
| `agreementId?` | `string` | service agreement id |
|
||||
|
||||
#### Returns
|
||||
|
||||
|
@ -620,6 +620,7 @@ export class Provider {
|
||||
jobId: string,
|
||||
providerUri: string,
|
||||
signer: Signer,
|
||||
agreementId?: string,
|
||||
signal?: AbortSignal
|
||||
): Promise<ComputeJob | ComputeJob[]> {
|
||||
const providerEndpoints = await this.getEndpoints(providerUri)
|
||||
@ -643,12 +644,13 @@ export class Provider {
|
||||
|
||||
let signatureMessage = consumerAddress
|
||||
signatureMessage += jobId || ''
|
||||
signatureMessage += (did && `${this.noZeroX(did)}`) || ''
|
||||
signatureMessage += nonce
|
||||
// On provider service we just check signature owner + jobId
|
||||
// signatureMessage += (agreementId && `${this.noZeroX(agreementId)}`) || ''
|
||||
// signatureMessage += nonce
|
||||
const signature = await this.signProviderRequest(signer, signatureMessage)
|
||||
const payload = Object()
|
||||
payload.signature = signature
|
||||
payload.documentId = this.noZeroX(did)
|
||||
payload.agreementId = this.noZeroX(agreementId)
|
||||
payload.consumerAddress = consumerAddress
|
||||
payload.nonce = nonce
|
||||
if (jobId) payload.jobId = jobId
|
||||
|
Loading…
x
Reference in New Issue
Block a user