1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
This commit is contained in:
alexcos20 2020-05-09 22:20:40 +03:00
parent 59e2accf68
commit c4921d129b
4 changed files with 8 additions and 10 deletions

View File

@ -26,12 +26,11 @@ export interface ServiceAccessAttributes extends ServiceCommonAttributes {
}
}
export interface ServiceComputePrivacy {
allowRawAlgorithm: boolean,
allowNetworkAccess: boolean,
allowRawAlgorithm: boolean
allowNetworkAccess: boolean
trustedAlgorithms: string[]
}
export interface ServiceComputeAttributes extends ServiceCommonAttributes {
main: {
creator: string

View File

@ -272,7 +272,7 @@ export class OceanCompute extends Instantiable {
const { templates } = this.ocean.keeper
const serviceAgreementTemplate = await templates.escrowComputeExecutionTemplate.getServiceAgreementTemplate()
const name = 'dataAssetComputingServiceAgreement'
let service={
const service = {
type: 'compute',
index: 3,
serviceEndpoint: this.ocean.brizo.getComputeEndpoint(),
@ -288,8 +288,7 @@ export class OceanCompute extends Instantiable {
serviceAgreementTemplate
}
}
if (computePrivacy)
service['attributes']['main']['privacy'] = computePrivacy
if (computePrivacy) service.attributes.main.privacy = computePrivacy
return service as ServiceCompute
}
}

View File

@ -230,7 +230,7 @@ describe('Asset Owners', () => {
let serviceIndex = null
for (let index = 0; index < oldDDO.service.length; index++) {
if (oldDDO.service[index].type == 'compute') serviceIndex = index
if (oldDDO.service[index].type === 'compute') serviceIndex = index
}
await ocean.assets.updateComputePrivacy(