diff --git a/docs/classes/Provider.md b/docs/classes/Provider.md index 9c937bfc..3757738d 100644 --- a/docs/classes/Provider.md +++ b/docs/classes/Provider.md @@ -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 diff --git a/src/services/Provider.ts b/src/services/Provider.ts index aec23bdc..be0252bd 100644 --- a/src/services/Provider.ts +++ b/src/services/Provider.ts @@ -620,6 +620,7 @@ export class Provider { jobId: string, providerUri: string, signer: Signer, + agreementId?: string, signal?: AbortSignal ): Promise { 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